Databases Reference
In-Depth Information
...
| Open_files | 128 |
| Slave_retried_transactions | 0 |
| Slow_launch_threads | 0 |
| Slow_queries | 21 |
...
| Sort_scan | 212588 |
| Table_locks_immediate | 5831792 |
| Table_locks_waited | 185 |
| Threads_cached | 0 |
| Threads_connected | 1 |
| Threads_created | 238543 |
| Threads_running | 1 |
| Uptime | 1786334 |
+----------------------------+------------+
157 rows in set (0.00 sec)
We've omitted most of the rows here for space considerations; your instance may well
show over 250 variable values.
You can also display the server status using mysqladmin status or mysqladmin extended-
status commands:
$ mysqladmin --user=root --password= the_mysql_root_password status
Uptime: 12093 Threads: 1 Questions: 7160 Slow queries: 0 Opens: 76
Flush tables: 1 Open tables: 60 Queries per second avg: 0.592
The extended-status command produces the same output as the monitor's SHOW
STATUS command.
The SHOW PROCESSLIST command displays all running threads on the MySQL server and
is a useful tool for diagnosing problems or understanding what users are doing. Try it
on your server when you're logged in as the root user:
mysql> SHOW PROCESSLIST;
+-------+------------+-----------------------------+--------+...
| Id | User | Host | db |...
+-------+------------+-----------------------------+--------+...
| 26533 | moodleuser | zahra.learningmysql.com:63593| Moodle |...
| 26534 | root | localhost | |...
+-------+------------+-----------------------------+--------+...
... +---------+------+-------+------------------+
... | Command | Time | State | Info |
... +---------+------+-------+------------------+
... | Sleep | 1 | | |
... | Query | 0 | | show processlist |
... +---------+------+-------+------------------+
2 rows in set (0.00 sec)
The output is fairly self-explanatory, and details are in the “SHOW syntax” section of
the MySQL manual. The mysqladmin processlist command produces the same output:
$ mysqladmin --user=root --password= the_mysql_root_password processlist
+-------+------------+-----------------------------+--------+...
| Id | User | Host | db |...
+-------+------------+-----------------------------+--------+...
 
Search WWH ::




Custom Search