Simple explanation
MySQL Server received a request from-you-to-connect to the database. So next thing it tried to do are to check the name is bound to your IP address (name resolution) and it failed to do s O. So it just denied you access.
You can understand how MySQL handles client-side parsing:
1, when MySQL client initiates a connection request, MySQL Server proactively checks the host name of the client.
2, first find the Windows system directory under the/etc/hosts file, search domain name and IP correspondence.
3, if the Hosts file does not, look for DNS settings, if not set up the DNS server, will immediately return to failure, if the DNS server is set, reverse parsing until timeout.
Solutions
The first method modifies the hosts
On the server where MYSQL server is located, modify the Windows Hosts file to add a row of records, such as:
172.28.208.149 www.xxxx.com
But this method is very mechanical, so the following method is generally used.
the second way to modify the MySQL configuration file My.ini
The solution:
Just add skip-name-resolve option to your MySQL configuration file (My.ini).
In the MYSQL Server configuration file My.ini, add the following two lines:
[Mysqld]
Skip-name-resolve
It will prevent MySQL Server from DNS parsing of external connections, and using this option can eliminate the time for DNS resolution for MySQL.
The third way to modify MySQL startup service
Enter the system service by running "Services.msc", locate the MySQL service, then open the login, select the Local System account instead of this account by selecting login status:-------------------------------------------------------------------------------
My problem is this cause!
MySQL connection error: Can ' t get hostname for your address