简体   繁体   中英

Connection error on MySQL Workbench 6.1

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!!

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

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM