Solve a large number of unauthenticated users in mysql

Source: Internet
Author: User

Mysql solved a large number of unauthenticated users a few days ago, the company server made adjustments, and then mysql could not connect .... time out was speechless, and I thought about all the methods I could think of. I didn't quite understand mysql either. At that time, I just guessed that mysql had come out. The problem was unknown, then lead the team to get it done .... www.2cto.com: The Problem description and solution are as follows: Execute the mysql Command show processlist. when viewing the process, a large number of unauthenticated users are displayed, roughly as follows: | 592 | unauthenticated user | 192.168.3.20: 35320 | NULL | Connect | login | NULL | 593 | unauthenticated user | 192.168.3.20: 35321 | NULL | Connect | login | NULL | 594 | unauthenticated User | 192.168.3.20: 35322 | NULL | Connect | login | NULL | cause: this is a special official setting and can also be called a mysql bug, no matter whether the connection is through the hosts or IP mode, he will reverse query the DNS. Mysql will try to reverse Query IP-> DNS, because reverse query and resolution are too slow to cope with fast and massive queries. Www.2cto.com is mainly caused by unstable DNS. If network isolation is performed and MySQL is in a relatively secure network environment, enabling the skip-name-resolve option will avoid this problem to the maximum extent. Solution: 1. When MySQL is started, add the -- skip-name-resolve option to disable domain name resolution and solve the problem. Example:/usr/local/mysql-5.1.36/bin/mysqladmin-u root-p shutdown/usr/local/mysql-5.1.36/bin/mysqld_safe -- skip-name-resolve & 2: In my. add skip-name-resolve 3 to the [mysqld] section of cnf: add the corresponding host record to 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.