MySQL exception: Unauthenticated user attempts to log in

Source: Internet
Author: User

Today's corporate database has stalled and blocked problems, check the database when found, show processlist; you can see a lot of:

....

: 3436942 : unauthenticated user : 192.168.0.4:49607 : : Connect : : login :

: 3436943 : unauthenticated user : 192.168.0.4:49608 : : Connect : : login :

.....

Constantly have unauthenticated users try to login but did not pass, have a classmate Google out, found that the domain name resolution is related to:

No matter what the client connection, the server side will be DNS back to the client to obtain the client domain name or host name.

It is likely that the DNS server is out of order to cause unresolved-although the parse result should be no

Classmate by adding Skip-name-resolve in my.cnf

To prevent reverse domain name resolution (or add parameter--skip-name-resolve to the startup command line).

This approach is also one of the recommended MySQL optimization methods.

But the disadvantage of this approach is that the host in the permission can no longer use the hostname, but to use the IP address, fortunately we configured the "%", so I prefer to use another way, is to add the corresponding host record in the/etc/hosts file.

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.