Hi i am trying to connet to a mysql databse whose servers IP is( 203.1123.28.111 ) from a remote PC and get the following errors
[root@server ~]# mysql -h 203.1123.28.111 -u root -p Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on 203.1123.28.111 (113)
Also on the server i cannot stop the firewall setting cuse of security reasons ..... most of the help on line say that the problem is resolved if the server's fire wall is disabled .
Does any one have any ideas how to get around this !!!
Dear Agnello,
On 9/12/07, Agnello George wrote:
Hi i am trying to connet to a mysql databse whose servers IP is( 203.1123.28.111 ) from a remote PC and get the following errors
[root@server ~]# mysql -h 203.1123.28.111 -u root -p Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on 203.1123.28.111 (113)
Also on the server i cannot stop the firewall setting cuse of security reasons ..... most of the help on line say that the problem is resolved if the server's fire wall is disabled .
Just add a rule to accept/allow connection to port 3306 (MySQL). However, it's better to put a rule to just allow connection from some known IP Addresses / host names for security reasons.
You will require to put your source IP(s) in MySQL Access Control list to allow remote connections over network. Default MySQL only allows connection from localhost (127.0.0.1). Please refer MySQL Docs for Access Control.
Does any one have any ideas how to get around this !!!
-- Warm Regards
Agnello . G .Dsouza
HTH With regards,
Just add a rule to accept/allow connection to port 3306 (MySQL). However, it's better to put a rule to just allow connection from some known IP Addresses / host names for security reasons.
You will require to put your source IP(s) in MySQL Access Control list to allow remote connections over network. Default MySQL only allows connection from localhost (127.0.0.1). Please refer MySQL Docs for Access Control.
where is this ACL located i configured mysql frm source /usr/local/mysql
In my mysql server where the databes is located , i have edited the /etc/my.cnf and did the following : bind-address = host ip # skip-networking
i also log to mysql and GRANT ALL PRIVILEGES ON *.* TO root@client'sipaddress IDENTIFIED BY 'root's_password';
quit;
Dear Agnello,
On 9/12/07, Agnello George wrote:
where is this ACL located i configured mysql frm source /usr/local/mysql
MySQL ACL is stored in mysql DB (Default)
i also log to mysql and GRANT ALL PRIVILEGES ON *.* TO root@client'sipaddress IDENTIFIED BY 'root's_password';
This should work. You have to add all IP addresses from where you want client(s) to access MySQL.
Warm Regards
Agnello . G .Dsouza
HTH With regards,
This should work. You have to add all IP addresses from where you want client(s) to access MySQL.
I have solved my problem
i edited the /etc/sysconfig/iptables i moved : ######################################################### -A INPUT -p tcp -m tcp -s [clients IP-addr} --dport 3306 --sport 1024:65535 -j ACCEPT ########################################################## to the top of the firewall rule before the blocking rules ....
Quoting Agnello George agnello.dsouza@gmail.com:
Also on the server i cannot stop the firewall setting cuse of security reasons ..... most of the help on line say that the problem is resolved if the server's fire wall is disabled .
Does any one have any ideas how to get around this !!!
You may have to get the sysadmin to add an exception for port 3306. Or maybe try to run mysql on a port which is not blocked by firewall.
Anurag