Q: The following error occurs when I log on to MySQL on another machine:
ERROR 2003 (HY000): Can't connect to MySQL server on 'x. x. x. x' (111)
A: The reason is that, considering the security factors of MySQL, the default configuration only allows local login.
Open the/etc/mysql/my. cnf file and find bind-address = 127.0.0.1 and change it to bind-address = 0.0.0.0.
Restart mysql: sudo/etc/init. d/mysql restart
Refer:
> I 've already check my/etc/my. cnf file for a "binding"
> Line. Its not
> There. I also found an item online that indicated
> Adding:
>
Look for the option "skip-networking". This disables TCP/IP so
Server only accepts local connections via the Unix socket. This sounds
Like your situation.
Note that a "cocould not connect" error means just that. If the problem
Was related to user privileges you wocould get an "access denied" error.
Q: In another case, an error similar to the following occurs:
ERROR 1045 (28000): Access denied for user 'test' @ 'x. x. x. x' (using password: NO)
A: The reason is that you have not set the remote host logon permission for the logon username.
Log on locally with root: mysql-u root-p
Modify the Host field of the username in the user table of MySQL database and change localhost to %
Use mysql;
Update user set Host = '%' where User = 'username ';