1. 程式人生 > >Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/vm10-0-0-19

Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/vm10-0-0-19

 輸入:service mysqld start 

報錯:

 Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/data/vm10-0-0-19.ksc.com.pid).

解決: ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/

參考部落格:在Centos上安裝MySQL時出現這樣的錯誤:Starting MySQL.. ERROR! The server quit without updating PID file (/usr/loca

輸入:service mysqld start

報錯:

Warning: World-writable config file '/etc/my.cnf' is ignored
Starting MySQL.Warning: World-writable config file '/etc/my.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf' is ignored

 ERROR! The server quit without updating PID file (/usr/local/mysql/data/vm10-0-0-19.ksc.com.pid).

出現這種情況的原因是:mysql故意不讓使用者重寫my.cnf,許可權預設是644, 即-rw-r--r--, 如果許可權不是644, 則會出現這種情況。

那就改:chmod 644 /etc/my.cnf  

參考部落格:Warning: World-writable config file '/etc/my.cnf' is ignored


3:輸入: mysql -uroot -p

報錯:

Enter password:

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

我的解決辦法:ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock