Turn from 51669223
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) This is because the default configuration file for MySQL database my.cnf (under Linux) Bind-addre The SS default is 127.0.0.1, so even if you create a remote access to the user, you can not use the mysql-h command to access, if the access will be a problem, because at this time MySQL only accept localhost, So we need to shield the bind-address off.
MY.CNF generally under/etc/mysql, if you are not using locate MY.CNF lookup, the MY.CNF configuration file before the modification is:
MY.CNF configuration file code before modification
#
# Instead of skip-networking The default is now-listen only on
# localhost which are more compatible and are not less secure.
Bind-address = 127.0.0.1
#
# Instead of skip-networking The default is now-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 masking
#
# Instead of skip-networking The default is now-listen only on
# localhost which are more compatible and are not less secure.
#bind-address = 127.0.0.1
#
# Instead of skip-networking The default is now-listen only on
# 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 to do, such as logging into the system:
Login Database Code
Mysql-h 192.168.0.19-u Root-p
Remote connection MySQL Error 2003 solution