Enable remote access to customer database

alexandz

Well-Known Member
Oct 28, 2011
111
0
66
Chile
cPanel Access Level
Root Administrator
Hello!
I have a client that uses HeidiSQL and needs to connect to the database remotely, but I have enabled remote access to MySQL
How I can enable remote access to a database?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
In cPanel > Remote MySQL, you would want to add the IP for the server that will be connecting remotely to the database.

Otherwise, if you would like all user accounts to have access from that IP, you can list it in WHM > SQL Services > Additional MySQL Access Hosts area. After adding the IP, click the Save button. At that point, go back into the area, then click the "Click Here" link to add to all cPanel accounts.
 

alexandz

Well-Known Member
Oct 28, 2011
111
0
66
Chile
cPanel Access Level
Root Administrator
Log into cPanel> MySQL Remote, IP for the server but still does not work gives me an error that says:

SQL Error (1130): Host 'nombrepc' is not allowed to connect to this MySQL server
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Did you create a MySQL database user and add the MySQL database user to the database in cPanel > MySQL Databases area? You'll need to create a database user and assign that user to the database before you can connect with a user.

If you did do that and you do have root SSH and root WHM access, you can always try opening up a ticket in WHM > Support Center > Contact cPanel location. Otherwise, please contact your hosting provider for them to investigate.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
I already noted that in my initial reply where you can add additional remote hosts in WHM > SQL Functions > Additional MySQL Access Hosts area. Please re-read my first reply.
 

alexandz

Well-Known Member
Oct 28, 2011
111
0
66
Chile
cPanel Access Level
Root Administrator
ok, But that case is for all accounts, and I just need for a client. In which case, and I use the option: Main>> SQL Services>> Setup Remote MySQL server
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
No, you would not use WHM's Setup Remote MySQL Server as that would only be if you are going to push all your MySQL databases to another server, which isn't the case on what you are doing. You are wanting to remotely connect from another server to one database, which would be in cPanel > Remote MySQL area for setting up those remote access hosts.

Please submit a ticket as I already requested.
 

Indianets

Well-Known Member
PartnerNOC
Jun 13, 2008
69
0
56
cPanel Access Level
Root Administrator
Glad, it was resolved for you.

Just trying to add some more things which could create problems from behind the scene --

1. Open the TCP IN port 3306 if you use a firewall and open selective ports.

2. Remove the line "skip-networking" from /etc/my.cnf if you have it.

Hope that completes it after suggestions from Tristan :)


Otherwise, if you would like all user accounts to have access from that IP, you can list it in WHM > SQL Services > Additional MySQL Access Hosts area. After adding the IP, click the Save button. At that point, go back into the area, then click the "Click Here" link to add to all cPanel accounts.
Worth mentioning it can not be undone. No? - http://forums.cpanel.net/f354/additional-mysql-access-hosts-issue-174402.html
 
Last edited: