[英]mysql.server restart gives error message
當我嘗試使用MySQL重新啟動時,出現以下奇怪錯誤:
$ sudo mysql.server stop
Password:
Shutting down MySQL
.. SUCCESS!
$ sudo mysql.server start
Starting MySQL
SUCCESS!
$ sudo mysql.server restart
Shutting down MySQL
.. SUCCESS!
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/my.local.pid).
我在這里查看了答案: mysql.server啟動時PID錯誤?
但出現以下錯誤:
$ mysql_install_db
FATAL ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
有什么建議么?
您可以嘗試以下幾種方法:
sudo /usr/local/mysql/support-files/mysql.server restart
sudo mv /etc/my.cnf /etc/my.cnf.bak
sudo mysql.server restart
rm *.err /usr/local/mysql/data/
rm /usr/local/var/mysql/*.err
希望其中之一能為您做到!
它很可能是權限問題。 嘗試使用以下命令解決它:
$ sudo chown _mysql /usr/local/var/mysql/*
要么
$ sudo chown -R _mysql:_mysql /usr/local/var/mysql
可能是mysql文件夾存在權限問題:
$ sudo chmod -R 777 /usr/local/var/mysql/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.