MySQL not auto starting on Yosemite

MySQL not auto starting on Yosemite 1

I was setting up a Mac Mini to replace the existing sd3labs office Linux server and ran across an issue with MySQL not starting on reboot, hell it actually gave an error on install saying the installed failed which it really didn’t. I came across a post on Stackoverflow explaining how to correct this and … Read More

Resetting MySQL root password from the CLI

Seems like I always end up searching for this so I thought I would add it to my site for easy reference.

  1. Stop MySQL
    sudo /etc/init.d/mysql stop
  2. Start MySQL with the following command
    sudo mysqld --skip-grant-tables &
  3. Login to MySQL as root with out a password
    mysql -u root mysql
  4. Replace PASSWORD with the new password of your choice.
    UPDATE user SET Password=PASSWORD('PASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;

Horde Mail SQL SessionHandler issue

If you have problems with Horde but SquirrelMail gives you the following message.

A fatal error has occurred Could not connect to database for SQL SessionHandler. Details have been logged for the administrator.

Here is what will fix the issue.

cd /tmp
ls |grep mysql

If you see nothing after that then type the following

ln -s /var/lib/mysql/mysql.sock

You will probably want to run /scripts/upcp after this to make sure that it updates everything else.