Query MySQL running status

Source: Internet
Author: User

Query MySQL running status
It is important to check the running STATUS of mysql. You can use phpmysadmin or directly log on to MySQL to run the show status command line;
The same statement also has show variables; show status is used to view MySQL running conditions, and the information displayed through pma is basically similar to show status.
Log on to MySQL directly under the command line to run the show status command. The query statement is as follows:

The same statement also has show variables;
SHOW VARIABLES
Show variables is used to view the configuration parameters of MySQL. You can also use show variables like 'key %'

SHOW PROCESSLIST
Show processlist is a process that is currently in progress. It is useful for troubleshooting situations such as locked tables. In general, enabling MySQL slow query records is also helpful for troubleshooting.

SHOW OPEN TABLES
Show open tables displays the list of opened TABLES.

Mysqladmin status
Run the following command to view the status using the mysqladmin tool that comes with MySQL:
Mysqladmin status-u root-p
The result is as follows:
Uptime: 499267 Threads: 95 Questions: 8810251 Slow queries: 41 Opens: 283 Flush tables: 1 Open tables: 276 Queries per second avg: 17.646
You can also add the-I 5 parameter to automatically refresh it every five seconds.
Mysqladmin-uroot -- password = 'Password' status-I 5

Mysqladmin extended-status
Similarly, you can use mysqladmin-uroot -- password = 'Password' extended-status to view more MySQL running information. This method is basically the same as that of the first method.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.