127.0.0.1 and localhost can connect to the MySQL server, but the corresponding IP is not, and error:
Can ' t connect to MySQL server on "10.0.73.25" (111)
The following may be the cause:
1. Network does not pass: Ping 10.0.73.25 found can ping, exclude this reason.
2.mysql configuration problem: Open MySQL configuration file mysql.cnf (the path under Linux is generally/etc/mysql/mysql.cnf), see skip-networking and bind_address configuration items
Ship-networking: It is used to skip TCP/IP traffic. MySQL can only be connected via a local socket, blocking the external network connection.
You can see if remote access is turned on by mysql>show variables like "%skip-networking%".
For off indicates that remote access is not blocked, exclude this cause.
Bind_address: The IP address it uses to bind MySQL. The default binding is to connect the bind_addres=127.0.0.1. You can either comment out the bing_address or set it to 0.0.0.0来 binds all IPs.
See mysql.cnf in Bing_address indeed 127.0.0.1, modified to 0.0.0.0.
Restart MySQL and find that the MySQL server is still not connected
3. May be the host setting or permissions issue for the root user of MySQL
View the user table in MySQL's MySQL database and find that the root host is localhost and only localhost is allowed, so change the root host to "%".
You can view the root user "%" host by mysql>show grants for [email protected] "%", if permissions are not sufficient to set their permissions.
Restart mysql,localhost,127.0.0.1 and 10.0.73.25 to connect to the MySQL server.
MYSQL.CNF Configuration classification: http://www.cnblogs.com/toby/articles/2198697.html
Reference Blog: http://blog.csdn.net/qustdjx/article/details/26937325
(mysql+php+apache) 127.0.0.1 and localhost can connect to the MySQL server, but IP cannot