Connection error on MySQL Workbench 6.1

2.7k Views Asked by At

I just upgraded my comp to the beta Yosemite and now my MySQL is giving me a connection problem.

I used to be able to run this command in terminal and get results:

/usr/local/mysql/bin/mysql -uroot -e "SELECT * FROM table_name"

But now it returns this:

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

I'm not sure how I even set this connection up in the first place so please any answers, pretend I'm not too savvy with this... Thanks in advance!!

2

There are 2 best solutions below

0
On BEST ANSWER

Okay I found out what happened. When I upgraded to Yosemite, this file disappeared or something. Anyway I had to reinstall the files. Everything is here in this link under the MySQL section:

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

1
On

First, verify that your MySQL server is running:

mysql.server start 

If that was not the issue, try starting the MySQL server in safe-mode using these instructions