1

I have just installed MySQL and MySQL Workbench.

After installing both, I can see the "MySQL" icon in System Preferences. But if I try to start MySQL Server it asks me the password, but then nothing happens. So I tried to start MySQL Server from the terminal with the following command:

sudo /usr/local/mysql/support-files/mysql.server start

But it gave me this error:

Starting MySQL
.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/MBP.local.pid).

Can anyone help me please?

Before all this I've not had any problems starting and stopping MySQL, but I forgot the MySQL password so I had to uninstall MySQL and install it again because I needed to use Workbench. But obviously without the MySQL password it didn't work. Is there a way for me to recover the password?

Styphon
  • 10,304
  • 9
  • 52
  • 86
Jackie
  • 15
  • 5

2 Answers2

0

The sudo line will try to run MySQL as root -- bad idea. Hopefully the mysql.server file was copied to /etc/init.d during install so all you should have to do is /etc/init.d/mysqld start

David Stokes
  • 120
  • 3
0
  1. Check if a mysql process already exists or not ps -ef | grep mysql

  2. If yes, Kill the process kill -9 PID or killall -9 mysql mysqld

  3. Check the owner ship of the mysql data directory is mysql:mysql
  4. Then try to start mysql server sudo mysql.server start
  5. If this do not resolve the issue. Then have a look in the mysql .err file

Check out: MySql ERROR! The server quit without updating PID file

Community
  • 1
  • 1
mysqlrockstar
  • 2,536
  • 1
  • 19
  • 36
  • I killed mysql process already existed and then restart my PC. Now all work fine. Thank you. – Jackie May 10 '16 at 15:36