Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

al404

macrumors 6502a
Original poster
Apr 24, 2011
541
35
Novara, Italy
Yesterday i did follow this guide to set up ( again ) Apache, PHP and MySQL
http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-10-yosemite/

today after i stared up my mac mini i found mysql was not running i try to start it from preference panel but did not start

i than did it from shell

sudo /usr/local/mysql/support-files/mysql.server start
Password:
Starting MySQL
............... SUCCESS!

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

sudo /usr/local/mysql/support-files/mysql.server start
Starting MySQL
............ ERROR! The server quit without updating PID file (/usr/local/mysql/data/iMac-di-Al404.local.pid).

i did try again with start and after getting success i did

mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

not sure if is on or not after first start
 

al404

macrumors 6502a
Original poster
Apr 24, 2011
541
35
Novara, Italy
i also has MAMP PRO but i prefer to use both

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
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.