Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to connect to my local MySQL server with MySQL Workbench. When I do so, I get a "Can't connect to MySQL server..." error. I can connect just fine if I SSH into the machine and start up MySQL there, so I know it's not an issue there.

Is there something special I need to do to tell my MySQL server that "outsiders" can connect to it?

share|improve this question

Make sure that

  • mysqld is not running with --skip-networking

  • or --bind-address =

Also make sure you have allowed your client end access to port 3306(by default) on the server and it is not firewalled.

There is more information and all you need to know on this page in the MySQL documentation.

share|improve this answer
Thanks, Richard. My solution turned out to be something a little different but your answer put me on the right track. – Jason Swett Sep 28 '10 at 13:08
Jason: Glad you got sorted. I forgot to mention the user@%. D'oh. Never mind you got there in the end. – Richard Holloway Sep 29 '10 at 16:10

yes you do - MySQL authentication is done on a username and host basis.

The best bet is to create an admin user that can auth from any host (% wildcard).

share|improve this answer
I did that. Apparently something more needs to be done because that didn't take care of it. (I made sure I could log in with my new user locally before trying it remotely.) – Jason Swett Sep 28 '10 at 12:57
up vote 0 down vote accepted

I found the following in /etc/mysql/my.cnf:

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

To solve my problem, I did two things:

  1. I created a new user: 'admin'@'%'
  2. I commented out the "bind-address" line in my.cnf.

Now it works.

share|improve this answer
Note: you must restart MySQL after this in order for the change to take effect. – Jason Swett Oct 11 '10 at 14:36

Your Answer


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.