MySQL won't start on reboot

Discussion in 'OS X Yosemite (10.10)' started by al404, Oct 18, 2014.

  1. al404 macrumors 6502

    al404

    Joined:
    Apr 24, 2011
    Location:
    Novara, Italy
    #1
    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
     
  2. simon48 macrumors 65816

    simon48

    Joined:
    Sep 1, 2010
  3. al404, Oct 18, 2014
    Last edited: Oct 18, 2014

    al404 thread starter macrumors 6502

    al404

    Joined:
    Apr 24, 2011
    Location:
    Novara, Italy
    #3
    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
     

Share This Page