Author Topic: MySQL Remote Connection  (Read 21282 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
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=0.0.0.0 (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.

Offline
*
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)

Offline
*
Re: MySQL Remote Connection
« Reply #2 on: April 25, 2024, 09:10:18 AM »
Perfect.
This tutorial worked like a charm.
CWP7 rocks!!!

Thank ozgur
You need a reliable hosting company for your website or your eshop?
Need a cheap, reliable, fast and secure hosting?
You want fast support and action to every technical issue?
Freespirits is here for you :) - Don't look any further!

Offline
*
Re: MySQL Remote Connection
« Reply #3 on: October 18, 2024, 04:38:49 PM »
The OP's procedure is highly problematic in terms of security.

No one should be opening up their server to the entire world in this fashion.

Do not follow the OP's instructions. Do not open port 3306 to all.

Offline
*****
Re: MySQL Remote Connection
« Reply #4 on: October 19, 2024, 03:32:13 AM »
Agreed!