• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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