简体   繁体   English

mysql无法启动OSX-无法通过套接字连接

[英]mysql won't start OSX — Can't connect through socket

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

That's what I get when I run $mysql (or sudo !! right after...) I have the preferences pane installed and have in the past had no problem starting and stopping it. 这就是我运行$ mysql(或紧随其后的sudo !!)后得到的信息。我安装了首选项窗格,并且过去启动和停止它都没有问题。 I got this error and upon checking the preferences pane, it was not running. 我收到此错误,并且在检查“首选项”窗格时未运行。 Hitting "start server" caused it to prompt me for my password, and then hang for a couple seconds, but not starting the server. 击中“启动服务器”导致其提示我输入密码,然后挂起几秒钟,但未启动服务器。

mysqld: Can't change dir to '/usr/local/mysql-5.1.51-osx10.6-x86_64/data/' (Errcode: 13)

120627 16:11:22 [ERROR] Aborting 120627 16:11:22 [错误]中止

is what I get when I run $mysqld from the command line. 这是我从命令行运行$ mysqld时得到的。 I've looked at half a dozen other posts on this topic, but none has really seemed to apply (so far) since I did nothing to my machine's configurations today, and mysql was running fine this morning. 我看了关于这一主题半打其他职位,但没有一个似乎真的应用(到目前为止),因为我今天什么都没有做我的机器的配置,和MySQL今天上午运行良好。

Are there logs I could check? 有可以检查的日志吗? Are there my.conf settings I should investigate? 是否有我应该调查的my.conf设置? If I sacrifice a lamb while installing cx_Oracle, will the database gods be appeased? 如果在安装cx_Oracle时牺牲了一只羔羊,数据库神会安抚吗?

Uninstall your current mysql version and then use Homebrew to install mysql. 卸载当前的mysql版本,然后使用Homebrew安装mysql。

brew install mysql

I found this answer very helpful: https://stackoverflow.com/a/6378429/554406 我发现此答案非常有帮助: https : //stackoverflow.com/a/6378429/554406

暂无
暂无

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

相关问题 Ruby on Rails 3 无法通过 OSX 上的套接字“/tmp/mysql.sock”连接到本地 MySQL 服务器 - Ruby on Rails 3 Can't connect to local MySQL server through socket '/tmp/mysql.sock' on OSX osx上的mysql:访问被拒绝,无法连接到socket - mysql on osx: access denied and can't connect to socket 通过自制程序安装后,MySQL(mysql_secure_installation)将无法工作:无法通过套接字连接 - MySQL (mysql_secure_installation) won't work after installing through homebrew: Can't connect through socket 安装后MySQL无法在OSX上运行-无法通过套接字'/tmp/mysql.sock'(2)连接到本地MySQL服务器 - MySQL doesnt run on OSX after intall — Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 错误 2002 (HY000): 无法通过 OSX 中的套接字 '/tmp/mysql.sock' (2) 连接到本地 MySQL 服务器 - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in OSX 带有 docker 的 Mysql:无法通过套接字连接到本地 MySQL 服务器 - Mysql with docker: Can't connect to local MySQL server through socket MySQL服务器崩溃且无法启动-无法通过套接字'/tmp/mysql.sock连接到本地MySQL服务器 - MySQL Server crashes and fails to start - Can't connect to local MySQL server through socket '/tmp/mysql.sock 开始使用预编译的mysql,但得到:无法通过套接字'/tmp/mysql.sock'(2)连接到本地MySQL服务器 - start using pre-compiled mysql, but get: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 无法通过套接字连接到本地 MySQL 服务器 - Can't connect to local MySQL server through socket 无法通过Travis CI上的套接字连接到本地MySQL服务器 - Can't connect to local MySQL server through socket on Travis CI
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM