Although there is “possibility” to allow external MySQL client connections to hostingaccounts under our cPanel server services, those are blocked on server level by default! However there is workaround to still use external connections for MySQL:

1. Under Windows OS
2. Under Unix/Linux/MacOS OS
3. MySQL Workbench
 


 

1. Under Windows OS

 
Under windows machines there is sadly no out-of-box solution for SSH connection. However one might use a program calledย PuTTYย for that!
Instructions how to create SSH tunnel with PuTTY for MySQL: http://realprogrammers.com/how_to/set_up_an_ssh_tunnel_with_putty.html
How to use Putty under Windows OS:ย https://www.radicenter.eu/how-to-use-ssh/#win
NB! Under cPanel server authenticatinc with main account password via SSH is not possible. You can only access SSH via authorized keypairs!ย Generated publikkey via PuTTY should be added/imported under Security -> SSH in cPanel and authorize it on the same page!

After that You can use command on Your localmachine commandline for โ€œremoteโ€ MySQL access:

mysql -h 127.0.0.1 -u DBUSERNAME -p DBNAME

 


 

2. Under Unix/Linux/MacOS OS

 
To generate needed keypairs for authentication etc:
https://www.radicenter.eu/how-to-use-ssh/#linux
NB! Under cPanel server authenticatinc with main account password via SSH is not possible. You can only access SSH via authorized keypairs!ย Generated publikkey via PuTTY should be added/imported under Security -> SSH in cPanel and authorize it on the same page!

To create SSH tunnel please use command (after checking that privatekey is indeed in needed folder!):

ssh -N -L 3306:127.0.0.1:3306 npXXXX@cpX.radicenter.eu

(where cpX is Your cpanel server name (cpa/cpb/…) and npXXXX is Your webhosting account main username)
After that You can use command on Your localmachine commandline for “remote” MySQL access:

mysql -h 127.0.0.1 -u DBUSERNAME -p DBNAME

 


 

3. MySQL Workbench

 
MySQL workbench is free software to manage MySQL/MariaDB servers/databases for Windows/Linux/MacOS. You can download it from:
https://dev.mysql.com/downloads/workbench/
Instructions how to create SSH tunnel for โ€œremoteโ€ MySQL authentication can be found on page:ย https://dev.mysql.com/doc/workbench/en/wb-mysql-connections-methods-ssh.html

IP Info:
Radicenter 2024