MySQL won't start after setting external bind-address

Solution 1:

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 0.0.0.0:3306            0.0.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 0.0.0.0. Some packaged versions of mysql come with startup/maintenance scripts that will attempt to access mysql on 127.0.0.1. 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.

Solution 2:

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 not 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.

Solution 3:

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.