Forum Moderators: open

Message Too Old, No Replies

Can't Connect to MySQL

         

trevordixon

3:56 am on Jul 13, 2007 (gmt 0)

10+ Year Member



I just installed MySQL on Debian. I can connect to it on the local machine with mysql -u root. Then I added a user with

GRANT ALL PRIVILEGES ON *.* TO 'trevor'@'%' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

Now I can connect on the local machine with mysql -u trevor -p, and I can specify -h localhost or -h 127.0.0.1 and still connects. But if I use the host 192.168.0.105 (the machine's local IP address) or the host trevor.hopto.org which points to my IP address, I can't connect. It tells me ERROR 2003: Can't connect to MySQL server on '192.168.0.105' (111).

It sounds like a router/firewall problem to me, but I've combed through all of my router configuration and tried everything, and I still can't connect. Is it possible this is a MySQL problem?

bartek

4:00 am on Jul 13, 2007 (gmt 0)

10+ Year Member



Check your my.cnf, comment out this line:
# bind-address = 127.0.0.1

Then restart the mysqld daemon.
hth

[edited by: bartek at 4:02 am (utc) on July 13, 2007]

trevordixon

4:01 am on Jul 13, 2007 (gmt 0)

10+ Year Member



I know my ISP blocks certain ports, 3306 could very well be blocked, but that wouldn't account for my not being able to connect with the host 192.168.0.105, right?

trevordixon

4:14 am on Jul 13, 2007 (gmt 0)

10+ Year Member



Excellent, thank you for helping me.