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
How to Request a Random Row in Sql
SQL Server - Best Way to Get Identity of Inserted Row
How to Do an Update Statement With Join in SQL Server
Simple Way to Transpose Columns and Rows in Sql
How to Return Only the Date from a SQL Server Datetime Datatype
Null Values Inside Not in Clause
What Is the Reason Not to Use Select *
Finding Duplicate Values in a SQL Table
Is There Any Rule of Thumb to Construct SQL Query from a Human-Readable Description
SQL Join - Where Clause Vs. on Clause
How to (Or Can I) Select Distinct on Multiple Columns
Postgresql Unnest() With Element Number
How to Use Parameters in Vba in the Different Contexts in Microsoft Access
You Can't Specify Target Table For Update in from Clause
How Stuff and 'For Xml Path' Work in SQL Server
How to Return Rows That Have the Same Column Values in MySQL