Mysql executes show processlist to solve the problem of "unauthenticated user"

Source: Internet
Author: User

An unibilling machine suddenly experienced heavy loads a few days ago. it is found that cpu usage is high in top. the agi program runs slowly and a zombie process occurs. in fact, there were only about 50 concurrent calls at that time. far below normal standards. the problem of restarting the machine was not solved. very strange.
 
Considering that mysqld occupies the most resources in top, you can log on to the mysql console and run the show processlist command to find that the information of a process is special:
 
User "unauthenticated user"
Command "connect"
Is State "reading from net" a hacker attacking my machine from the internet? Apparently not, because the Host column displays "localhost ".
 
No way. I found this problem on google. It cannot be considered a mysql bug because I can solve it by changing the configuration file/etc/my. cnf.
 
Specifically, add skip-name-resolve to the mysqld column.
 
[Mysqld]
 
Skip-name-resolve
 
Note that skip-name-resolve can disable dns resolution. However, you cannot use the host name in the mysql authorization table. You can only use the IP address. in the past, if you used localhost to create a mysql user, you must use 127.0.0.1 to add the user in the grant statement.
 
Then, restart mysqld.
Author: OurMySQL

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.