[root@itcast02 itcast]# /etc/init.d/mysql restart //启动服务
ERROR! MySQL server PID file could not be found!
Starting MySQL................ ERROR! The server quit without updating PID file (/var/lib/mysql/itcast02.pid).//出错
[root@itcast02 itcast]#mysql -u root -p //登录
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) //错误
[root@itcast02 itcast]# /etc/rc.d/init.d/mysqld status //查看状态失败
bash: /etc/rc.d/init.d/mysqld: No such file or directory
[root@itcast02 itcast]#chown -R mysql:mysql /var/lib/mysql //设置权限
[root@itcast02 itcast]#/etc/init.d/mysql restart //重新启动
ERROR! MySQL server PID file could not be found!Starting MySQL...... SUCCESS! //启动成功