remotely connect to MySQL database ?

passgad

New member
I am a new hosted member and I want to know if it is possible to remotely connect to MySQL database with MySql Workbench ?

I tried with this without luck:

host = passgad.gi9.co
port = 3306
username = passgad_root (it's a MySQL Users but I also tried with my main account passgad)

I also tried to setup a SSH tunnel between my PC and the server using SSH-client (for example, Putty) with the MySQL port (3306) forwarding (21098) but it did not work.

Is it possible ?
 

Genesis

Administrator
Staff member
Have you added it in cPanel as you have to enable that feature first - look under databases. There is a feature there where you can add it. You have to do that before anything can work.
 

passgad

New member
Genesis said:
Have you added it in cPanel as you have to enable that feature first - look under databases. There is a feature there where you can add it. You have to do that before anything can work.

Are you referring to this: "Remote Database Access Hosts" ?

I tried to add % as the host (to accept everything...)

Thank you
 

Genesis

Administrator
Staff member
Yes, the instructions are:


1. Login to your cPanel (if not already logged in).
2. Scroll down to the Databases section.
3. Click on the Remote MySQL icon.
4. Enter the IP address of the computer that will be making the remote connection. If it is a dynamic IP then best to just enter %. This will allow any IP to remotely connect to your databases.
5. Click the Add Host button.
 

passgad

New member
Genesis said:
Yes, the instructions are:


1. Login to your cPanel (if not already logged in).
2. Scroll down to the Databases section.
3. Click on the Remote MySQL icon.
4. Enter the IP address of the computer that will be making the remote connection. If it is a dynamic IP then best to just enter %. This will allow any IP to remotely connect to your databases.
5. Click the Add Host button.

Thanks Genesis.

This is exactly what I tried but still no luck. I still get the error:

"Cannot Connect to Database Server"
 

Genesis

Administrator
Staff member
Have you told your Windows Fewall that you are connecting remotely? Check your computer control panel. There should be an option for Windows Firewall and in the exceptions you need to tick remote desktop. That way you will whitelist your IP.

If that still doesn't work, there's an article here you can check out. Just be aware if you open up ports in your Firewall that that opens up a security risk. There's a reason for the firewall.

http://www.frihost.com/forums/vt-114726.html
 

passgad

New member
Genesis said:
Have you told your Windows Fewall that you are connecting remotely? Check your computer control panel. There should be an option for Windows Firewall and in the exceptions you need to tick remote desktop. That way you will whitelist your IP.

If that still doesn't work, there's an article here you can check out. Just be aware if you open up ports in your Firewall that that opens up a security risk. There's a reason for the firewall.

http://www.frihost.com/forums/vt-114726.html

Windows Firewall is disabled on my machine because I have a router.

I did open the port 3306 (WAN - Virtual Server / Port Forwarding).

Is it this port on the server for MySQL ? I checked in phpMyAdmin but the configured port is not mentioned anywhere...


I did more tests and it seems that port 3306 for passgad.gi9.co (IP: 37.187.74.24) is closed. Port 80 is opened.

checked with this online tool:
Open Port Check Tool

Can someone confirm to me the MySQL port configured on the server please ?