Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I try to connect to MySQL via Sequel Pro SSH I get the following error:

Unable to connect to host a.fcknet.dk because the port connection via SSH was refused.

Please ensure that your MySQL host is set up to allow TCP/IP connections (no --skip-networking) and is configured to allow connections from the host you are tunnelling via.

You may also want to check the port is correct and that you have the necessary privileges.

Checking the error detail will show the SSH debug log which may provide more details.

MySQL said: Lost connection to MySQL server at 'reading initial communication packet', system error: 0

I checked my my.cnf, and the following section existed:

#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = 127.0.0.1

I am able to successfully connect through SSH and then manually connecting to the MySQL server via the mysqlcommand. How do I make this work? :-)

Thanks in advance.

share|improve this question
add comment

1 Answer

I may be mistaken here but I think that if MySQL binds to the localhost it only listens via a socket, so it will not be connectable via localhost:3306 (which is how the tunnelling will work).

Test this by trying to telnet to it: telnet 127.0.0.1 3306

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.