# mysql -u root -pyyy
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.0.67 MySQL Community Server (GPL)
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
Enter password:
mysqld is alive
mysqladmin Ver 8.42 Distrib 5.0.67 on i686
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 5.0.67
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 100 days 0 hours 0 min 0 sec
Threads: 1 Questions: 241986 Slow queries: 0 Opens: 11097
Flush tables: 2 Open tables: 32 Queries per second avg: 1.23
Uptime: 8640000
Threads: 1 Questions: 241986 Slow queries: 0 Opens: 11097
Flush tables: 2 Open tables: 32 Queries per second avg: 1.23
- Uptime: segundos desde los que se inició el servidor
- Threads: numero total de clientes conectados
- Questions: número total de consultas que el servidor ha ejecutado desde desde su inicio.
- Slow queries: número total de consulta que el servidor ha ejecutado y que tienen un tiempo mayor de ejecución a la variable long_query_time.
- Opens: número total de tablas abiertas por el servidor.
- Flush tables: cuantas tablas han sido "volcadas".
- Open tables: número total de tablas abiertas en la base de datos.
+-----------------------------------+-----------+
| Variable_name | Value |
+-----------------------------------+-----------+
| Aborted_clients | 579 |
+---------------------------------+---------------------------------+
| Variable_name | Value |
+---------------------------------+---------------------------------+
| auto_increment_increment | 1 |
+----+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+----+---------+------+-------+------------------+
| 20 | root | localhost | | Sleep | 36 | | |
| 23 | root | localhost | | Query | 0 | | show processlist |
+----+------+-----------+----+---------+------+-------+------------------+
+----+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+----+---------+------+-------+------------------+
| 20 | root | localhost | | Sleep | 36 | | |
| 23 | root | localhost | | Query | 0 | | show processlist |
+----+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+----+---------+------+-------+------------------+
| 24 | root | localhost | | Query | 0 | | show processlist |
+----+------+-----------+----+---------+------+-------+------------------+
Dropping the database is potentially a very bad thing to do.
Any data stored in the database will be destroyed.
Database “basedeprueba” dropped
# mysqladmin -u root -pxxx flush-logs
# mysqladmin -u root -pxxx flush-privileges
# mysqladmin -u root -pxxx flush-status
# mysqladmin -u root -pxxx flush-tables
# mysqladmin -u root -pxxx flush-threads
Previo a este comando es necesario identificar el thread a eliminar ejecutando el comando processlist de mysqladmin.
Slave stopped
+----+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+----+---------+------+-------+------------------+
| 43 | root | localhost | | Query | 0 | | show processlist |
+----+------+-----------+----+---------+------+-------+------------------+
Threads: 1 Questions: 50 Slow queries: 1 Opens: 10 Flush tables: 2
Open tables: 0 Queries per second avg: 0.5
mysqladmin Ver 8.42 Distrib 5.0.67 on i686
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 52 min 15 sec