mysql安装错误排查
查看mysql-server 的状态
[root@localhost ~]# service mysql status;
MySQL is not running, but lock exists[FAILED]
或者
[root@localhost mysql]# /etc/init.d/mysql status;
MySQL is not running, but lock exists[FAILED]
查看mysql.sock 位置是否在安装目录下
100106 10:56:23 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
100106 10:56:23 InnoDB: Started; log sequence number 0 44233
解决办法:mysql_install_db --user=mysql --datadir=/var/lib/mysql/
客户端:
Starting MySQL..Manager of pid-file quit without updating file.[FAILED]
错误日志:
100107 05:17:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100107 05:17:19 mysqld_safe mysqld from pid file /var/lib/mysql/slave0.pid ended
//数据目录权限问题
chown -R mysql /var/lib/mysql
100108 0:26:09 [Warning] The syntax 'for replication startup options' is deprecated and will be removed in MySQL 6.0. Please use 'CHANGE MASTER' instead.
100108 0:26:09 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=slave0-relay-bin' to avoid this problem.
100108 0:26:10 [Warning] The syntax 'for replication startup options' is deprecated and will be removed in MySQL 6.0. Please use 'CHANGE MASTER' instead.
100108 0:26:10 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=slave0-relay-bin' to avoid this problem.