---
title: "mysql 安装 错误"
author: "xxtianxiaxing"
date: "2010-01-06T15:00:39Z"
tags: ["MySQL"]
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2010-01-08T15:02:56Z"
id: 563991
url: "https://xylonwang.iteye.com/blog/563991"
---

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.