Author Topic: MySQL Remote Connection  (Read 16809 times)

0 Members and 1 Guest are viewing this topic.

MySQL Remote Connection
« on: December 20, 2016, 11:44:26 PM »
Hi all,

I've just solved my mysql remote connection problem, and I thought that this may help someone else.

Let me begin with MySQL or phpMyAdmin:
* Create a new user (by your root account) or use existing user. Select Any Host (write % to textbox and it means "from everywhere") selection or write specific IP (you would like to connect remotely from) to that textbox.
* Consider giving global privileges for this user (check all if you don't mind)
* Now, you can also give access right to this user for specific databases or specific tables.
Let's continue with CWP:
* You also need to add bind-address= (from everywhere or write your IP address for connection) in my.cnf (it may be named as my.ini) file. You can also use CWP's "SQL Services" > "MySQL Configuration" page for doing this configuration.
* Restart mysql service.
* Add firewall rule for giving permission to the IP with "IN" "TCP" "3306" (mysql specific port or without port number in order to open all ports for that IP). You can use CWP's Security > Firewall Manager
* Restart Firewall then.
* Check your firewall rules.
Also look at:
* If you use firewall service from 3rd party, ask them there is a block or not.

Re: MySQL Remote Connection
« Reply #1 on: December 09, 2020, 04:35:26 PM »
This is the way. Great tutorial. I just want to add that for some reason from time to time CWP recreate de config on the firewall. So once in a while i always have to came back and add 3306 port on csf.conf as you mention ( on firewall manager)