昨天使用rpm安装了一个mysql最新版本,在安装的时候因为系统里面自带了mysql5.1的版本。所以我在安装mysql5.5的时候一直报错,故使用yum -y remove mysql*将老版本的安装包移除,然后才将其安装成功,因为是rpm安装,不能更改安装路径,注意!后面因为要迁移环境,故需要将data的存放路径修改一下,于是我vi /etc/init.d/mysql 进去之后将datadir指到了?/opt/reuters/dds 。保存之后为了让配置文件生效就需要重启进程,ok,这下好了,进程不能停止也不能启动了,使用/etc/init.d/mysql stop 总是报这个错,ERROR! MySQL server PID file could not be found!,进去data目录下查看使用localhost.localdomain.err 查看报错信息,
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
130613 17:42:05 mysqld_safe mysqld from pid file /opt/reuters/dds/data/localhost.localdomain.pid ended
130613 17:46:44 mysqld_safe Starting mysqld daemon with databases from /opt/reuters/dds/data
130613 17:46:44 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
130613 17:46:44 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
130613 17:46:44 InnoDB: The InnoDB memory heap is disabled
130613 17:46:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130613 17:46:44 InnoDB: Compressed tables use zlib 1.2.3
130613 17:46:44 InnoDB: Using Linux native AIO
130613 17:46:44 InnoDB: Initializing buffer pool, size = 128.0M
130613 17:46:44 InnoDB: Completed initialization of buffer pool
130613 17:46:44 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
ps -ef | grep mysql 进程也不存在开得太多卡死这一说,网上说的基本都是让在初始化权限表时使用shell> ..../mysql_install_db --user=mysql --datadir=/usr/local/mysql/var,说真的我还真不会这样操作,后来在万般无奈之下有打开配置文件,在datadir后面又加了一级目录mysql,datadir=/opt/reuters/data/mysql.奇迹出现了,重启进程成功,问题是解决了。希望这个可以对处理mysql报错信息的童鞋有帮助哈