Friday, 15 February 2013

unable to access MySQL server remotely on centOS -



unable to access MySQL server remotely on centOS -

i have centos 6.5 on mysql 5.6.21 running, trying access mysql server linux 14.0.4 lts server every time show error 2003 (hy000): can't connect mysql server on '192.192.4.86' (113).

i able access centos using putty , winscp windows machine not able connect centos mysql server other operating system.

i did next things.

skip-networking commented. grant privileges on . 'root'@'192.192.4.222' identified 'root'; grant privileges on . 'root'@'127.0.0.1' identified 'root'; grant privileges on . 'root'@'localhost' identified 'root';

add next things in iptables

-a input -i eth0 -p tcp --destination-port 3306 -j take -a input -i eth0 -s 192.192.4.222 -p tcp --destination-port 3306 -j take -a input -s 192.192.4.85 -m tcp -p tcp --dport 3306 -j take

port 3306 in listing mode checked.

netstat -nat |grep 3306 tcp 0 0 :::3306 :::* hear

but not able access centos mysql server remotely.

if 1 know wrong or missing please allow me know.

thanks in advance.

login mysql root username , root password

mysql -u root -proot

run below commands run mysql remote host

grant on *.* mysqluser@'localhost' identified 'mysqluser';

grant privileges on *.* 'mysqluser'@'localhost' grant option;

create user 'mysqluser'@'%' identified 'mysqluser';

grant privileges on *.* 'mysqluser'@'%' grant option;

now check able login hostname username , password

mysql -h yourhostname -u mysqluser -pmysqluser

mysql centos remote-access

No comments:

Post a Comment