简体   繁体   English

/tmp/mysql.sock在停止mysql后消失-无法在OSX上重新启动

[英]/tmp/mysql.sock disappears after stopping mysql - can't restart on OSX

I am trying to get mysql set up properly on OSX Mavericks. 我正在尝试在OSX Mavericks上正确设置mysql。 I have installed the 3 packages from here http://dev.mysql.com/downloads/mysql/ . 我已经从http://dev.mysql.com/downloads/mysql/安装了3个软件包。 Everything works as expected. 一切正常。

However, when I click Stop MySQL Server in the preferences pain window shown below, I cannot restart the server. 但是,当我在如下所示的“偏好设置”窗口中单击“ 停止MySQL服务器”时,无法重新启动服务器。 I am pretty sure that this is due to the fact that the /tmp/mysql.sock file gets removed. 我很确定这是由于/tmp/mysql.sock文件被删除的事实/tmp/mysql.sock The only way to get the server to start again is to restart my computer, which is less than ideal. 使服务器重新启动的唯一方法是重新启动计算机,这不理想。

在此处输入图片说明

How can I get the /tmp/mysql.sock file to stick around even after stopping the server? 即使停止服务器后,如何保持/tmp/mysql.sock文件不变?

As a side note I have symlinked the mysql.sock file using this command, but I don't think this is related 附带说明一下,我已使用此命令对mysql.sock文件进行了符号链接,但我认为这无关

sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

I also noticed that I cannot find a my.cnf file anywhere. 我还注意到,在任何地方都找不到my.cnf文件。 Should I create this file someplace? 我应该在某个地方创建该文件吗?

I ended up removing all files using this post as a reference http://akrabat.com/computing/uninstalling-mysql-on-mac-os-x-leopard/ and reinstalling using homebrew brew install mysql . 我最终使用这篇文章作为参考http://akrabat.com/computing/uninstalling-mysql-on-mac-os-x-leopard/删除了所有文件,然后使用homebrew brew install mysql重新brew install mysql So far so good with this install. 到目前为止,此安装效果很好。 Probably was some kind of permission issue preventing mysql.sock from being created on start - but not too sure. 可能是某种权限问题阻止了mysql.sock在启动时创建-但不是太确定。

暂无
暂无

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

相关问题 安装后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) 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 MySQL地狱......无法连接数据库/tmp/mysql.sock - MySQL hell… can't connect to database /tmp/mysql.sock 错误 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 Mac 更新并重新启动后,我的 sql 服务器无法正常工作 - 错误 2002 (HY000):无法通过套接字 '/tmp/mysql.sock' 连接到本地 MySQL 服务器 - My sql server is not working after Mac update and restart - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' 缺少 mysql.sock; 产生操作错误:(2002,“无法通过套接字连接到本地 MySQL 服务器‘/tmp/mysql.sock’(2)”) - Missing mysql.sock; yielding OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)") 错误 2002 (HY000):无法通过套接字“/tmp/mysql.sock”连接到本地 MySQL 服务器。 安装后报错 - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' . Error after installation 符号链接后:ERROR 2002(HY000):无法通过套接字'/tmp/mysql.sock'(2)连接到本地MySQL服务器 - After symbolic link: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 警告:mysql_connect():无法通过套接字“ /tmp/mysql.sock”连接到本地MySQL服务器(2) - Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) `connect':无法通过套接字'/tmp/mysql.sock'(2)连接到本地MySQL服务器(Mysql2 :: Error) - `connect': Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (Mysql2::Error)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM