我已经跑MySQL Ver 14.14 Distrib 5.6.10, for osx10.6 (x86_64)
了一段时间了,没有任何问题。今晚我不得不硬重启我的笔记本电脑,在它启动一段时间后,我试图访问一个开发数据库。我收到以下错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
以下是命令和响应:
$ which mysql
#=> mysql: aliased to nocorrect mysql
$ unset TMPDIR
$ mysql_install_db
#=> FATAL ERROR: Could not find ./bin/my_print_defaults
$ sudo /usr/local/mysql/support-files/mysql.server start
#=> ERROR! The server quit without updating PID file (/usr/local/mysql/whoamis-MacBook-Pro.local.pid).
$ mysqld
#=> 2013-10-19 00:11:08 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-10-19 00:11:08 5029 [Warning] Can't create test file /usr/local/var/mysql/whoamis-MacBook-Pro.lower-test
2013-10-19 00:11:08 5029 [Warning] Can't create test file /usr/local/var/mysql/whoamis-MacBook-Pro.lower-test
mysqld: Can't change dir to '/usr/local/var/mysql/' (Errcode: 2 - No such file or directory)
2013-10-19 00:11:08 5029 [ERROR] Aborting
2013-10-19 00:11:08 5029 [Note] Binlog end
2013-10-19 00:11:08 5029 [Note] mysqld: Shutdown complete
$ usr/local/Cellar/mysql
果然,这里也安装了mysql。所以有一个 in /usr/local/mysql
,也有一个 in /usr/local/Cellar/mysql
,但至少没有一个在/usr/local/var
其中mysqld
似乎在寻找的地方。值得注意的是,系统首选项工具以及 mySQL Workbench 服务器工具也没有成功启动服务器。知道从哪里开始吗?