I'm using XAMPP on OS X Maveriks and I'm running XAMPP to have MySQL and Apache.
It was running great and no problem but today when I tried to run MySQL from os-x-manager, it says Starting then Stopped.
I searched and used this command in terminal :
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
it gives the following error:
Starting MySQL . ERROR! The server quit without updating PID file (/Applications/XAMPP/xamppfiles/var/mysql/Boshras-MacBook-Pro.local.pid).
I searched for the PID file, it wasn't found, i created it using and rm *.local.err before it
touch Boshras-MacBook-Pro.local.pid
but the pid file disappears every time i try to start MySQL. Any help would be appreciated.
Use SUDO
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
Maybe mysql does not have permission to the folder where the pid file is located in.
Solution working for my case:
Check your error log at /Applications/XAMPP/xamppfiles/var/mysql/Boshras-MacBook-Pro.local.err
If there is something like this in the log: ...[Note] Unable to delete pid file: Permission denied..., which means mysql does not have the permission to your mysql folder
Use the following command in terminal to grant the permission: sudo chown -R mysql /Applications/XAMPP/xamppfiles/var/mysql