Remote MySQL

Status
Not open for further replies.

Divvy

Active Member
806
2009
18
0
Hello guys,

I need to login in a application using my database details.
But I cant enter because appears this error:
Could not create database connection

Someone told me to:
Check to see if you need to add your ip address to your cpanel. It should be under your cpanel "Remote MySQL". Its pretty simple, just add your ip address and save the setting. Or if not cPanel then in the "WHM" control panel.

Some hosts might require that you contact them to set it up.
Most desktop applications of the sort require the remote ip to be set up before you can connect.

I did:
cPanel:
http://i.imgur.com/gF693.png

WHM:
http://i.imgur.com/EuKjH.png

And he said:
Ask your host if they allow the connection through the firewall..

Can someone help me solving this issue?
How can I solve this through WHM?
I use csf firewall.

Thank you guys!
 
10 comments
Possible Problems

1) check if your firewall is blocking the port .. try to disable the firewall then try
2) are you entering the correct database details ?
3) try entering the main IP of your vps instead of domain name
4) which software are you using ?? try mysql workbench (it's free)
5) make sure you are not using localhost :facepalm: when connecting to the db from your pc (i am sure you won't be doing this mistake)

6) are you entering your correct IP in the cpanel/whm ?? make sure it's not ur router's IP or the DHCP server's IP
7) are you getting any error numbers ??
8) have you checked your mysql server logs ? you may find many more details like why you are getting access denied error




:)
 
Last edited:
1) I disabled the firewall but I continue with same problem.
2) yes I am
3) already tried that without success
4) Im using PHPLD pagerank updater application
5) any more suggestions?
 
Hello there,

Check your MySQL settings (/etc/my.cnf) to ensure that it is listening for an external connection. If you have disabled networking, you will have to comment that out, then restart the server. You can also run this command to see what it is listening on:

Code:
netstat -anp | grep mysql

Chris
 
since he has cpanel/whm installed

that setting gets activated automatically as he will add the remote IP for accessing the database

anyways .. you can check
 
I have an dedicated server...

Here is the result of the command given by SS-Chris:
PHP:
root@server [~]# netstat -anp | grep mysql
unix  2      [ ACC ]     STREAM     LISTENING     25846834 20992/mysqld        /                                                                             var/lib/mysql/mysql.sock
unix  3      [ ]         STREAM     CONNECTED     247733406 20992/mysqld                                                                                     /var/lib/mysql/mysql.sock
unix  3      [ ]         STREAM     CONNECTED     247084969 20992/mysqld                                                                                     /var/lib/mysql/mysql.sock
root@server [~]#
 
Hi there,

You are not listening on a TCP socket, otherwise it would list port 3306. You need to check your my.cnf file. Someone stated added it in WHM corrects this, however, I do not believe they are correct. Adding in WHM will allow the IP in the mysql hosts table, this does not change the daemon though, as it is driven by the my.cnf file.

Chris
 
Thank you for your precious help SS-Chris :)

I had "skip-networking" present in /etc/my.cnf. I commented that line out and restarted MySQL (/etc/init.d/mysql restart).

Now is working fine :D
 
Status
Not open for further replies.
Back
Top