Accessing cPanel Database externally

ezeapostle

Registered
Apr 6, 2011
2
0
51
Hey all,

I signed up to the forums just now as I have a problem in which I hope someone can help me.

I am currently building my client a new website and a feature of the website is that they want both a CMS and products list. The CMS is hosted on MediaTemple (MT) - as are all my other websites and a products database is currently hosted on cPanel.

When developing locally I ran into the problem of connecting to the products database but soon found the answer to the problem on these forums! I entered my IP address to the 'Remote Database Access Hosts' section and all worked! Now the website has been finished I'm uploading the files to my server (MT) which obviously changes the access required. I added the static IP address of my MT server and the domain itself but I still can't get access. I also used a wildcard (%) with the domain after but still no access. The wildcard itself works ('%') so I know that the access is there but iI'm not sure what I need to add!

Can anyone help?

Thanks in advance
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
42
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Are the username and password for the database user correct? The main reason you might not be able to connect would be the connection string doesn't have the right authentication credentials.
 

ezeapostle

Registered
Apr 6, 2011
2
0
51
Hey Tristan,

Thanks for your reply. Yes, the username and password details are correct. The wildcard option works when adding to the 'Remote Database Access Hosts' - it's just when I try and lock it down to my servers IP address/domain name that it displays a connection error. Both the IP address and domain of the server are correct but it won't accept any.

Any other ideas/suggestions?

Thanks in advance
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
42
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Are you certain you are using the correct IP address for the connection? On the cPanel machine to see what is connecting on port 3306 (the MySQL port), try the following command:

Code:
tcpdump port 3306
You should see the connections from the MT site to your cPanel machine with the IP listed. That would be the IP you'd need to allow access. Do this when you have the wildcard (%) enabled so that the connection works. You might also need to load some of the pages that will pull up the database or whatever script you would use on the MT site to test it.