I am having difficulty using MySQL on my MacBook, I am trying to start my server using sudo mysqld_safe and this results in the following output:
14
In my case I had a similar problem on Mac OS 10.10 Yosemite. For some reason when I killed the mysql process manually it changed the ownership of the error log file /usr/local/var/mysql/rally.local.err to _mysql instead of caleb. Unlike the accepted solution above, the whole rest of my directory is owned by caleb, not _mysql.
I fixed it by running sudo chown caleb /usr/local/var/mysql/rally.local.err
For the record I guess the proper way to stop and start the mysql server in Yosemite is with /usr/local/var/mysql/mysql.server start|stop|restart.