Solution to mysql remote login error
- 2020-06-07 05:27:23
- OfStack
Error: ERROR 2003 (HY000): Can 't connect to server on...
Solutions:
1. By default, Mysql only allows local login, so the configuration file needs to be modified to bind the address to comments:
$sudo vi /etc/mysql/my.cnf
#bind-address = 127.0.0.1 < -- Comment out this line to log in remotely
2, then sudo service mysql restart restart. It's ready to connect.
Solutions:
1. By default, Mysql only allows local login, so the configuration file needs to be modified to bind the address to comments:
$sudo vi /etc/mysql/my.cnf
#bind-address = 127.0.0.1 < -- Comment out this line to log in remotely
2, then sudo service mysql restart restart. It's ready to connect.