Jump to content

Recommended Posts

Posted

Hi there

 

I run a few sites here at TCH all on individual viritual hosts (the only way i can afford it).

 

I would like them to all use a single MySQL database for certain things, but everytime i try and get my PHP to connect to a database on a different host, MySQL sends an Access Denied to my a code and therefore my script is unable to execute.

 

How do I get the PHP on one virutal host to connect the the MySQL database on another????

 

Steve

Posted

On the server with the MySQL database, in CPanel / MySQL Databases, you need to add the servers you want you want to have access in the "Access Hosts" section (near the bottom of the page). These servers should be added as "serverXX.totalchoicehosting.com", where "XX" is the server number.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...