Jump to content

Archived

This topic is now archived and is closed to further replies.

alexis101

Connecting to a remote mysql server

Recommended Posts

Hello everyone,
My problem is:
I have a remote mysql server and i cant connect to it . I granted all privilege to root from my ip address (i have a static one) and still when i try to conect to my server i still have the message
ERROR 2003 (HY000): Can't connect to MySQL server on (XXX.XXX.XXX.XXX)

Here is what i did :
[code]
mysql>GRANT ALL PRIVILEGES ON *.* TO root@XXX.XXX.XXX.XXX IDENTIFIED BY "**********";
[/code]
and on my local machine
[code]
localhost ~ # mysql --host=XXX.XXX.XXX.XXX --pass
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on 'XXX.XXX.XXX.XXX' (111)
[/code]


Anyone can point me where i did my error?
Thank you!

Share this post


Link to post
Share on other sites
There's nothing wrong from a MySQL standpoint, it has to be some kind of networking error. My best guess is that the server is not listening to the default port (3306 I believe), or there is a firewall somewhere in between.

Share this post


Link to post
Share on other sites
well i did a ngrep on the port 3306 and here is what i got :
[code]
ngrep -W byline 3306
interface: eth0 (XXX.XXX.XXX.XXX/XXX.XXX.XXX.XXX)
match: 3306
#########################################################################
#########################################################################
#########################################################################
#########################################################################
#########################################################################
#########################################################################
#########################################################################
exit
98549 received, 0 dropped
localhost ~ #
[/code]

Anyway i dont understand my server is not behind any firewall or any router ...

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.