View MySQL thread run condition

Source: Internet
Author: User

To run a command with an administrator user:

Mysql> Show [full] processlist; # full is optional, and if not added, only the first 100 results are displayed by default.

You can rely on this result to analyze some information such as user connection status. For example, I used navicat to connect with the company's remote database server, the following error occurred:

Lost connection to MySQL server @ ' Waiting for initial communication packet ', System error:0

after looking at the data, it is found that when you connect to MySQL by IP address, MySQL defaults to the address to resolve the visitor's host name. If a service such as DNS is not configured, it will time out in the process of ongoing attempts to parse, causing the error above. The simple solution is to add a visitor's ip<> hostname mapping to the MySQL server's/etc/hosts, so that the host name can be parsed correctly and the database connection completed.

Just my company's intranet environment is complex, in the absence of network management personnel assistance, it is difficult to locate the final IP access. you can then go through show [full] processlist; Real-time tracking threads parse out the correct IP address.

View MySQL thread run condition

Related Article

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.