MySQL: How to share one database from multiple websites?

SuperBaby

Well-Known Member
Nov 27, 2003
345
1
166
Thailand
cPanel Access Level
Website Owner
Twitter
I intend to install vBulletin forum script in 3 websites (different hosting account on the SAME server). The script will be installed on each website so that they will have their own design theme. But all 3 scripts will share the same MySQL database.

domain1.com <--- MySQL database hosted here and named "username_forum".

domain2.com <--- The vBulletin forum script will use the MySQL database hosted on domain1.com

domain3.com <--- The vBulletin forum script will use the MySQL database hosted on domain1.com

How do I do it?

I believe I have to create a host under:
cPanel >> MySQL Database >> Account Maintenance (Add Host)
But I do not know what to specify here.

Also, for the script in domain1.com, the config for connection should be "localhost". What about the config for domain2.com and domain3.com? What should be used to replace "localhost"?