I was having this problem because I installed a wrong version of mysql.
So I have to remove previous version.
I got this steps online and it works for me.
First of all, remember to stop the mysql server.
You can stop the server by System Preferences -> MySQL, Stop MySQL Server
1 Sudo edit file /etc/hostconfig
Remove line MYSQLCOM=-YES-
Actually I don’t have this line in the file
2 Open up terminal and run the following commands
sudo rm /usr/local/mysql sudo rm -rf /usr/local/mysql* sudo rm -rf /Library/StartupItems/MySQLCOM sudo rm -rf /Library/PreferencePanes/MySQL* sudo rm -rf /Library/Receipts/mysql* sudo rm -rf /Library/Receipts/MySQL* sudo rm /etc/my.conf
For some of the files I still don’t have in my Mac. Maybe because I did not have a full installation of mysql before.