简体   繁体   English

MySQL Workbench 6.1上的连接错误

[英]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. 我刚刚将comp升级到beta优胜美地,现在我的MySQL给我一个连接问题。

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服务器正在运行:

mysql.server start 

If that was not the issue, try starting the MySQL server in safe-mode using these instructions 如果这不是问题,请尝试按照以下说明以安全模式启动MySQL服务器

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: 此处的所有链接都在MySQL部分的下面:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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