使用my-innodb-heavy-4g.chf 后mysql无法启动
军哥,帮我找找错误原因,我恢复到原来的的my.cnf也还是同样问题。140724 13:04:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140724 13:04:32 Can't find messagefile '/usr/share/mysql/errmsg.sys'
/usr/local/mysql/bin/mysqld: Unknown error 1146
140724 13:04:32 Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
140724 13:04:32 InnoDB: The InnoDB memory heap is disabled
140724 13:04:32 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140724 13:04:32 InnoDB: Compressed tables use zlib 1.2.7
140724 13:04:32 InnoDB: Initializing buffer pool, size = 4.0G
140724 13:04:32 InnoDB: Completed initialization of buffer pool
140724 13:04:32InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name /usr/local/mysql/var/ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
140724 13:04:32 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 系统里可能还有其他mysql存在
用yum或apt-get 安装的一般数据库在/var/lib/mysql
建议用rpm -qa|grep mysql 或dpkg -l|grep mysql 看一下
如果要用heavy-4g的配置文件需要将里面的一些配置要改掉
如启用了,需要修改datadir = 还需要修改innodb_data_home_dir 和innodb_log_group_home_dir 为你数据库目录
我查询了下,得到这些提示
/# dpkg -l|grep mysqliilibdbd-mysql-perl 4.021-1+b1 amd64 Per l5 database interface to the MySQL database
iilibmysqlclient18:amd64 5.5.37-0+wheezy1 amd64 MyS QL database client library
iimysql-common 5.5.37-0+wheezy1 all MyS QL database common files, e.g. /etc/mysql/my.cnf
# rpm -qa|grep mysql
bash: rpm: command not found
回复 3# 的帖子
apt-get remove mysql-common然后rm -rf /etc/mysql/
再启动mysql应该就行了 很奇怪的是,我按照上述操作了后还是启动不了,日志文件如下:
140731 16:07:55InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name /usr/local/mysqlar/ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
140731 16:07:55 mysqld_safe mysqld from pid file /usr/local/mysqlar/shenziyang.pid ended
140731 16:08:12 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysqlar
^G/usr/local/mysql/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
140731 16:08:12 Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
140731 16:08:12 InnoDB: The InnoDB memory heap is disabled
140731 16:08:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140731 16:08:12 InnoDB: Compressed tables use zlib 1.2.7
140731 16:08:12 InnoDB: Initializing buffer pool, size = 4.0G
140731 16:08:13 InnoDB: Completed initialization of buffer pool
140731 16:08:13InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name /usr/local/mysqlar/ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
140731 16:08:13 mysqld_safe mysqld from pid file /usr/local/mysqlar/shenziyang.pid ended
页:
[1]