![](/img/trans.png)
[英]404 error when using brew to install mysql - macOS Sierra
[英]brew install mysql, error when trying to stop the server
后:
brew install mysql
mysql_install_db
我試圖stop
MySQL服務器:
$ mysql.server stop
Shutting down MySQL
.. ERROR! Manager of pid-file quit without updating file.
我該如何解決上述錯誤? 謝謝!
信息:
$ mysql -v
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.51 Source distribution
mysql的安裝說明建議將/usr/local/Cellar/mysql/5.1.54/com.mysql.mysqld.plist
復制到~/Library/LaunchAgents
以便Mac OS X在您登錄時自動啟動mysqld。
如果您以這種方式設置mysqld,那么在Mac OS X v10.4及更高launchd
中控制LaunchAgents的launchd
進程將在mysqld進程被mysql.server stop
命令殺死后立即自動重啟。 這可能是錯誤消息的原因,因為服務器正在自動重新啟動。
剛剛在我的Mac上測試了這個。 運行mysql.server stop
命令十次,每次'launchd'在大約一秒后重新啟動msyqld進程。 六次命令以“成功”結束! 信息。 四次以“錯誤!pid文件管理器退出而不更新文件”消息結束。
更新:剛剛意識到我沒有提到如果mysqld服務器是由launchd啟動的話。
這是停止mysqld守護進程的命令。
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
你試過運行killall mysqld
嗎?
試一試..
cd YOURPATH/usr/local/mysql
rm -rf *.local.err
(刪除文件) touch YOURUSERNAME.local.pid
(生成新的* .local.pid文件,拋出的錯誤正在抱怨) mysql.server start
重新啟動mysql
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.