• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

How to share mysql db between domains?

J

jackop

Guest
I created a mysql db in domain A, and I now want to access it from domain B.
How can I do that?
 
Are the domains on the same server? If not you will need to modify the "mysql" database entries on the target server to allow remote access.

Log in to mysql as admin and run the following commands:

use mysql;

update user set Host = '%' where User = 'TargetDB_Username';

update db set Host = '%' where Db = 'TargetDB_Database';

flush privileges;

Also make sure the 3306 port is open on the firewall, at least for the connecting IP. :D
 
Back
Top