Remote MySQL

Post Reply
mahdysharifi
Junior Member
Posts: 2
Joined: 29 Jan 2014, 20:13

Remote MySQL

Post by mahdysharifi »

Hi :

We did setup up remote mysql , then add both Server IP - Main server & Mysql Server - to firewall whitelist . you need know we use CSF Firewall plugin.

But when CSF enabled Query slowed and not good communication between 2 server . but when disable CSF this problem resolved and Query run quickly .

Is it any misconfig ? How can resolve this issue , we need CSF .


Thank You
nuffsaid
Junior Member
Posts: 11
Joined: 11 May 2014, 10:10
Location: Port 80

Re: Remote MySQL

Post by nuffsaid »

I'm not sure if this will help but i just picked it up on googling


CSF to configure remote MYSql

Add the following line in your /etc/csf/csf.allow on both the servers,

vi /etc/my.cnfport = 3306
bind-address=YOUR-SERVER-IP
# skip-networking -- Hash this entry
/etc/init.d/mysql restart


Grant access to remote IP address
Login to MySQL
mysql -u root –p mysql

If the remote Ip is 123.12.12.21
then use the below command
GRANT ALL ON db.* TO dbuser@'123.12.12.21' IDENTIFIED BY 'PASSWORD';

Then, allow access using the below command,
tcp|in|d=3306|s=192.168.x.x
tcp|out|d=3306|d=192.168.x.x

Restart csf with : csf -r
Post Reply