You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem with MySQL Server

Hi, I have upgraded to Yosemite and I am having problems with MySQL Server. It's not running at start up. In Mavericks it was running good. Any suggestions?

Mac mini, OS X Yosemite (10.10)

Posted on Oct 17, 2014 4:17 PM

Reply
6 replies

Oct 18, 2014 1:49 AM in response to mrFonseca

same problem, i did follow this guide yesterday and apache, php and mysql seems to work

today after reboot i'm not able to start mysql


i did follow this guide

http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx- 10-10-yosemite/


i noticed that mysql.sock link is gone, but recreating doesn't fix it


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

Starting MySQL

.... SUCCESS!


if i try to connect i get


$ mysql -u root -p

Enter password:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


if i check in var/mysql mysql.sock is gone


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

$ mysql -u root -p

Enter password:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (62)


this time i get 62 instead of 2

Oct 20, 2014 1:59 AM in response to Al404

Create /Library/LaunchDaemons/com.mysql.mysql.plist and save it with the following plist:


    <!--?xml version="1.0" encoding="UTF-8"?-->    <plist version="1.0">      <dict>       <key>KeepAlive</key>       <true>       <key>Label</key>       <string>com.mysql.mysqld</string>       <key>ProgramArguments</key>       <array>       <string>/usr/local/mysql/bin/mysqld_safe</string>       <string>--user=mysql</string>       </array>      </true></dict>    </plist
>

Then load the newly created plist file with


sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist

Jan 12, 2015 11:46 PM in response to DCondrey

Got an error with your plist, terminal said somewhere was an invalid property. So finally this one make it work:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
   <key>KeepAlive</key>
   <true/>
   <key>Label</key>
   <string>com.mysql.mysqld</string>
   <key>ProgramArguments</key>
   <array>
   <string>/usr/local/mysql/bin/mysqld_safe</string>
   <string>--user=mysql</string>
   </array>
  </dict>
</plist>

And also changing some permisions to the file:

sudo chown root /Library/LaunchDaemons/com.mysql.mysql.plist
sudo chgrp wheel
/Library/LaunchDaemons/com.mysql.mysql.plist
sudo chmod
644/Library/LaunchDaemons/com.mysql.mysql.plist

And finally load the plist:


sudo launchctl load-w /Library/LaunchDaemons/com.mysql.mysql.plist

Based on a SO answer.

Mar 8, 2015 5:49 PM in response to pzin

actually a make the plist thing and the cmod thing and they show me the ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

than a check the process on active monitor called mysqld and make

killall mysqld than when y try on terminal mysql to make a login they works

for some reason the process is already running i think for this they cannot start o something

see?

sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist

/Library/LaunchDaemons/com.mysql.mysql.plist: Operation already in progress


they show me this

Problem with MySQL Server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.