We had a web app running on an OSX server backed by mysql. The server is running Darwin kernel 9.8.0. Mysql version is 5.0.67.

It was working fine previously, and we're not entirely sure what might have changed. The computer has since been rebooted to see if it would start mysql. Unfortunately, this means that I can't tell you if it was erroneously rebooted by another user before that, and that caused the problem.

The errors I am getting are:

/usr/libexec/mysqld: File './mysql-bin.124367' not found (Errcode: 13)
090826 14:42:50 [ERROR] Could not use mysql-bin for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.

That file it couldn't find really does exist ... So, I turned off logging in the my.cnf to see what else might be happening. Now the error I get is:

090826 14:52:16 [ERROR] Can't start server: Bind on TCP/IP port: Can't assign requested address
090826 14:52:16 [ERROR] Do you already have another mysqld server running on port: 3306 ?

I did a ps -Aef | grep mysql and found no other running daemons. With ifconfig I saw that the loopback device was in fact up. I tried binding mysqld to a different port (3307), but got the same error (but for 3307).

I've tried starting mysqld as root. I've tried starting it passing in the arguments --user=_mysql.

I can't figure out what else to try. Any suggestions?

EDIT: @nambuls: netstat -n -p tcp | grep 3306 returns nothing.

EDIT2: the error log also shows warnings - I didn't post before since they were just "warnings", but it might help.

090826 15:16:02 [Warning] Can't create test file /var/mysql/tanglewood.lower-test
090826 15:16:02 [Warning] Can't create test file /var/mysql/tanglewood.lower-test

I'm not sure why it can't create the test file - /var/mysql is 775 for _mysql:admin, and I started the process as admin.

3 Answers 3


try adding this to you my.cnf file:

  bind-address      =

Note that this will only allow local mysql connections. If you are running your webserver on the same host this bind-address will be fine for your setup.

If the works, you may try the systems IP address. bind-address should not normally be required.

  • Hi keithosu - for some reason i didn't see your post before I clicked "answer my own question". Gonna give you the answer though since that would've fixed the problem for me!
    – Matt
    Aug 26, 2009 at 20:41
  • here the future, it happened again, suddenly. Added bind-address in /usr/local/mysql/my.cnf and restarted with sudo /usr/local/mysql/support-files/mysql.server start. I didn't have it before....
    – Glasnhost
    Mar 12, 2018 at 14:25

Okay - found the problem. The mysql configuration file (/etc/my.cnf) was set to bind a different IP address than the one currently assigned to the network device. I changed it to bind the current address, and got it working again. The tip-off was that it couldn't bind 3306, even though I couldn't find anything anywhere using it.


have you check a netstat output ?

netstat -n -p tcp | grep 3306

to see if there is a program already listening on the mysql port ?

If it returns nothing, then the port is not being used.

  • Just did - nothing is on 3306 (or 3307 which I also tried to start mysqld on)
    – Matt
    Aug 26, 2009 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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