When we use the client and its remote connection to the server MySQL database, the following problems are easy to appear:
Problem Code Code
ERROR 2003 (HY000): Can ' t connect to MySQL server on ' 192.168.0.19 ' (111)
ERROR 2003 (HY000): Can ' t connect to MySQL server on ' 192.168.0.19 ' (111) The reason is the MySQL database default profile my.cnf (Linux) bind- Address defaults to 127.0.0.1, so even if you create a remote access user, you can not use the mysql-h command to access, if the access will have problems, because at this time MySQL only accept localhost, So we need to shield the bind-address off.
MY.CNF is generally under/etc/mysql, if the locate MY.CNF lookup is not used, the MY.CNF profile before the modification is:
Pre-Modified MY.CNF profile code
#
# Instead of skip-networking The default is now to listen only On&nbs P
# localhost which are more compatible and are not less secure.
Bind-address &nbs p; = 127.0.0.1
#
# Instead of skip-networking The default is now to listen only ON
# localhost which are more compatible and are not less secure.
bind-address = 127.0.0.1
All we need to do is block this bind-address code, and the code behind the mask is:
MY.CNF configuration file code after shielding
#
# Instead of skip-networking The default is now to listen only
# localhost which are more compatible and are not less secure.
#bind-address = 127.0.0.1
#
# Instead of skip-networking The default is now to listen only
# localhost which are more compatible and are not less secure.
#bind-address = 127.0.0.1
Now you can use the mysql-h command to do what you want, such as the login system:
Log in to the database code
Mysql-h 192.168.0.19-u Root-p