Ok, I've searched all over and have spent quite a bit of my time installing, uninstalling, trying various option but without success.
I'm on Mac OS X Lion (10.7.3) and am trying to setup a Python, MySQL.
I successfully installed Python and MySQL via HomeBrew. Python works great.
After MySQL Installation, I followed the first 2 steps - unset and the mysql_install_db
commands.
Now, when I try to start mysql "mysql.server start", I get the following error
ERROR! The server quit without updating PID file (/usr/local/var/mysql/Brajeshwar.local.pid).
Brajeshwar
is my username on my machine.
This is file permission problem. Check disk permissions and repair.
Osx => Cmd+Space => Disk Utilty => Verify Disk Permissions.
Verify completed after Repair Disk Permissions. mysql.server start command is worked succesfuly.
None of the answers worked for me. However, I simply did
sudo mysql.server start
and it worked nicely.Also, for me, it did NOT show permissions issue in *.err file.
November, 2014: If you're getting this error on MySQL 5.6.x on Mac OS X Mavericks or Yosemite and want to use MySQL with PHP locally (/tmp/mysql.sock is where PHP PDO expects to find the sock file), here is what fixed it for me:
1) Uncomment the default homebrew config file lines and edit as below
BOXNAME is what you have in your System Prefs -> Network as the unique id for your computer on the network.
2) Set permissions on all the files in the mysql datadir. These were all owned by [my_username]. MySQL is very picky about this and refuses to create the pid file unless it (the user _mysql) owns the directory.
3) Start MySQL using the bash helper/wrapper script:
Hope that helps. If the above doesn't work for you, try to run the mysqld_safe binary manually in the Cellar/mysql/VERSION_/bin/ directory and check what the settings are (if it runs)
If that runs, you can
and see something like
I'm not sure why that worked for me but it shows you where I got the my.cnf config file options from. You can also use the command line options to try to troubleshoot when starting mysqld manually.
If you do run manage to run MySQL server using mysqld_safe, you may have to do this to shut it down before trying the mysql.server bash helper. Resist the urge to kill -9 [PID] because you can corrupt your data.
Good luck!
works for me.
I ended up with completely reinstalling of mysql, and it finally worked out.
WARNING This will remove all of your databases, so make sure to save dumps first.
While Installing from source,please follow the instruction in file
INSTALL-SOURCE
where installation instruction are given in
section 2.8
after installation ,check are there any process running of mysql with ps aux | grep mysql
You'll find like this
kill
all process related tomysql
,and then try to start mysql server