Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 want to enable remote access to my MySQL server so I've set the bind-address option under [mysqld], which looks like:

# skip-networking
# Disabling symbolic-links is recommended to prevent assorted security risks

When I comment bind-address, the server starts normally. However, when I comment it out it won't restart. The port is open and listens.

Can you please help me sort this out? Thanks

share|improve this question
**.**.**.66 isn't a valid IP address... – womble Jul 19 '11 at 0:38
@womble, eh? Isn't that just standard address obfuscation? – Zoredache Jul 19 '11 at 0:41
@Zoredache: We don't know, do we? Perhaps that really is what he put in, and that's why it's not working. The correct way to obfuscate addresses is to use the RFC5737 documentation networks. – womble Jul 19 '11 at 0:43
Probably I should clarify this, in the actual my.cnf file I use the real IP address. I use * just to hide it here. – Vasilis Jul 19 '11 at 1:10

Why do you think you need to use bind-address to enable remote access?

Without the bind-address option try running the command netstat -ntlp | grep 3306. If you see output like below, then mysql is listening on every IP associated with the computer.

tcp        0      0  *               LISTEN      23465/mysqld 

You only really need the bind-address if you want to listen on a specific IP. If you want to listen for requests on all addresses you should leave that commented out or set it to Some packaged versions of mysql come with startup/maintenance scripts that will attempt to access mysql on If you use the bind-address option then mysql will only be bound to that specific IP, and nothing else, possibly breaking any scripts that you currently have.

share|improve this answer
netstat: option -p requires an argument – Almo Dec 17 '13 at 20:59
It does not require an argument on the net-tools version of netstat on Linux. What OS are you running on? I know netstat has different syntax/options on Windows, and on BSD. – Zoredache Dec 17 '13 at 21:07
Ah, ok. Thanks. :) – Almo Dec 18 '13 at 0:48

Make sure there isn't a stalled mysqld instance already started. Check

ps aux|grep mysqld

and kill all processes with

kill -9

then try to start mysqld again. Pay attention to mysqld processes in "Sl" state.

share|improve this answer
and make sure the sky isn't falling and that the power grid is still alive. Am I still breathing? – chicks Oct 20 '15 at 16:09

Maybe this will help some folks:

It appears that if bind-address is declared in 2 places, the service fails to restart.

Perhaps you quickly scanned your /etc/conf/my.cnf file and did see a 2nd appearance of bind-address. However, note that the file may contain a !includedir directive, and some of those included files can contain a 2nd bind-address.

share|improve this answer

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.