输入: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  

参考博客:IT虾米网


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



评论关闭
IT序号网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!