Can't Connect to MySQL Server Error 111

Can't connect to MySQL server error 111

It probably means that your MySQL server is only listening the localhost interface.

If you have lines like this :

bind-address = 127.0.0.1

In your my.cnf configuration file, you should comment them (add a # at the beginning of the lines), and restart MySQL.

sudo service mysql restart

Of course, to do this, you must be the administrator of the server.

ERROR 2003 (HY000): Can't connect to MySQL server on [IP] (111 Connection refused)

You can see your issue here

MariaDB [(none)]> SELECT User, Host FROM mysql.user WHERE Host <> 'localhost';
+--------+---------------+
| User | Host |
+--------+---------------+
| remote | [ Server A IP ] |
+--------+---------------+

You really need [Server B IP] here

 GRANT ALL ON <DB>.* TO 'remote'@'server_B_IP';

This should do it.



Related Topics



Leave a reply



Submit