mysql起动报错The server quit without updating PID file (/usr/local/mysql/data/
查看错误日志显示:
131206 23:10:21 mysqld_safe mysqld from pid file /usr/local/mysql/data/mysql.pid ended
重新配置vi /etc/my.cnf 加入
#在[mysqld]中添加:
datadir = /usr/local/mysql/data
log-error = /usr/local/mysql/data/error.log
pid-file = /usr/local/mysql/data/mysql.pid
user = mysql
tmpdir = /tmp
#保存退出
#初始化数据库
./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/mysql.pid --tmpdir=/tmp
[root@localhost scripts]# service mysqld restart
Shutting down MySQL. [确定]
Starting MySQL.. [确定]