Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql won't start after upgrading Mac OS X Yosemite (Mac OS 10.10)

Right after upgrading to Mac OS Yosemite (10.10), my Mysql won't start anymore. Instead I get

MacBook-Pro:/ user$ sudo /usr/local/mysql/support-files/mysql.server start
Starting MySQL 
. ERROR! The server quit without updating PID file (/usr/local/mysql/data/wireless.ubc.ca.pid).

I tried to check version number but I also get the following error

MacBook-Pro:/ user$ /usr/local/mysql/bin/mysql -v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I found lots of people having problems with XAMPP not working after Yosemite install, Also eclipse not working. I see many people just say reinstall. Is there anyway to fix this?

like image 493
Whitecat Avatar asked Oct 28 '14 22:10

Whitecat


People also ask

Why is MySQL not opening on Mac?

Open System Preferences >> Security & Privacy, and you will see a message in the Window saying under the title "Allow apps downloaded from", and you will see that macOS is preventing MySQL Workbench from opening up because it wasn't downloaded from a trusted and identified developer source.

How do I start MySQL After installing Mac?

Open macOS system preferences and select the MySQL preference panel, and then execute Start MySQL Server. The Instances page includes an option to start or stop MySQL, and Initialize Database recreates the data/ directory.

Does macOS come with MySQL?

MySQL for macOS is available in a number of different forms: Native Package Installer, which uses the native macOS installer (DMG) to walk you through the installation of MySQL. For more information, see Chapter 2, Installing MySQL on macOS Using Native Packages. You can use the package installer with macOS.


2 Answers

I haven't yet updated to Yosemite yet but I had this link saved when I do:

Get Apache, MySQL, PHP and phpMyAdmin working on OSX 10.10 Yosemite

This specific line may do some good:

sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

But check the whole post and let me know if it helps!

Good luck!

like image 116
Marcelo Gaia Avatar answered Sep 30 '22 20:09

Marcelo Gaia


I don't think so this installation is needed. I got the same issue when I upgraded to Yosemite.

I tried to run the mysql server through command line but it failed, saying

Starting MySQL .... ERROR! The server quit without updating PID file (/usr/local/var/mysql/Bilals-MacBook-Pro.local.pid).

I went in preferences and clicked mysql there, and it was stopped. Start mysql from preferences which will ask for root password, and it worked :)

like image 27
Bilal Ahmed Avatar answered Sep 30 '22 18:09

Bilal Ahmed