• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Sharing MySQL dB's among domains

R

rbhaydon

Guest
One of my customers wishes me to host multiple domains on a common Plesk 6.5 server that share a common MySQL database, yet I seem to be unable to share a common MySQL dB across domains -- at least one created using PLESK Admin. Each Plesk-created MySQL dB seems only accessible by that dB.

What I have done so far is:

1. Create MySQL dB under Domain "A", and create a username to access it. All is well & works under Domain "A".

2. Under Domain "B" (on the same Plesk 6.5 server), I modify the "global.php" file in the "httpdocs" folder to include a reference to this database created in Domain "A", using the same username & Password. It is denied access...


Does Plesk 6.5 not use "global.php" files to access databases? Is there a way to bypass this control mechanism so that a Plesk-created MySQL database can be shared amongst domains using a common username? Should I create another instance of MySQL running on the Plesk Server that is NOT controlled by Plesk (seems complex...)?

I guess one solution is to host MySQL on another server, but that is not really solving the problem.

Any ideas?

Thanks,
Bruce
Ottawa, Canada
 
Originally posted by rbhaydon
One of my customers wishes me to host multiple domains on a common Plesk 6.5 server that share a common MySQL database, yet I seem to be unable to share a common MySQL dB across domains -- at least one created using PLESK Admin. Each Plesk-created MySQL dB seems only accessible by that dB.

What I have done so far is:

1. Create MySQL dB under Domain "A", and create a username to access it. All is well & works under Domain "A".

2. Under Domain "B" (on the same Plesk 6.5 server), I modify the "global.php" file in the "httpdocs" folder to include a reference to this database created in Domain "A", using the same username & Password. It is denied access...


Does Plesk 6.5 not use "global.php" files to access databases? Is there a way to bypass this control mechanism so that a Plesk-created MySQL database can be shared amongst domains using a common username? Should I create another instance of MySQL running on the Plesk Server that is NOT controlled by Plesk (seems complex...)?

I guess one solution is to host MySQL on another server, but that is not really solving the problem.

Any ideas?

Thanks,
Bruce
Ottawa, Canada

Are both domains on the same IP? You may need to drop a copy of PHPMyAdmin on your machine running as the root MySQL user and add a new user with permissions to connect from anywhere, I can't say I've tried it out on any of our machines but I will give it a hook to see if I hit the same problem.
 
Hello & thanks for the reply,
Yes, the server on which this is all taking place uses one IP shared amongst all domains. I did try using PHPMyAdmin to create another user for that original database, but didn't work.

Thanks,
Bruce
 
Hi, I run into the same problem. Was there a solution for that? I need to share the DB between 2 domains sharing IP.... I have a DB created under one domain and now we have a new domain sharing some information....

Trying to connect using localhost or IP is not working.... some permissions needed I guess.....
 
Back
Top