我需要关于如何启动mysql服务器的帮助。 根目录已满时出现问题。 为了能够login到directadmin并启动mysql,我添加了一个/ var / lib / mysql / to / home / mysql的软链接。 由于我的数据库用完了数据库。 /目录有50Gb和/ home有1.5Gb。 但是我仍然无法启动mysql。
我运行/etc/init.d/mysqld status ,下面是结果:
MySQL is not running, but lock file (/var/lock/subsys/mysql)
我试图删除文件/ var / lock / subsys / mysql
但是,当我试图启动MySQL,它给了我下面的结果:
[root@fst /]# /etc/init.d/mysqld start Starting MySQL.The server quit without updating PID file (/var/lib/mysql/fst.srv.net.pid).
我已经检查了MySQL的权限和文件的所有者,但结果相同。
chmod 755 -R /var/lib/mysql chown mysql:root /var/lib/mysql
我也无法findmysql.sock。 但我想这将是由MySQL创build时启动。
以下是错误日志的内容
121212 01:04:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 121212 1:04:22 [Note] Plugin 'FEDERATED' is disabled. 121212 1:04:22 InnoDB: The InnoDB memory heap is disabled 121212 1:04:22 InnoDB: Mutexes and rw_locks use GCC atomic builtins 121212 1:04:22 InnoDB: Compressed tables use zlib 1.2.3 121212 1:04:22 InnoDB: Using Linux native AIO 121212 1:04:22 InnoDB: Initializing buffer pool, size = 128.0M 121212 1:04:22 InnoDB: Completed initialization of buffer pool InnoDB: Error: auto-extending data file ./ibdata1 is of a different size InnoDB: 64 pages (rounded down to MB) than specified in the .cnf file: InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages! 121212 1:04:22 InnoDB: Could not open or create data files. 121212 1:04:22 InnoDB: If you tried to add new data files, and it failed here, 121212 1:04:22 InnoDB: you should now edit innodb_data_file_path in my.cnf back 121212 1:04:22 InnoDB: to what it was, and remove the new ibdata files InnoDB created 121212 1:04:22 InnoDB: in this failed attempt. InnoDB only wrote those files full of 121212 1:04:22 InnoDB: zeros, but did not yet use them in any way. But be careful: do not 121212 1:04:22 InnoDB: remove old data files which contain your precious data! 121212 1:04:22 [ERROR] Plugin 'InnoDB' init function returned error. 121212 1:04:22 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 121212 1:04:22 [ERROR] Unknown/unsupported storage engine: InnoDB 121212 1:04:22 [ERROR] Aborting 121212 1:04:22 [Note] /usr/sbin/mysqld: Shutdown complete
它让我困惑,问题是什么。 请向我伸出你的帮助。 我一直在研究这个问题两天了。
它看起来像你的InnoDB索引已损坏。
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size 121212 1:04:22 InnoDB: Could not open or create data files.
尝试将/var/lib/mysql/ibdata1 , /var/lib/mysql/ibdata2等移动到另一个目录并再次启动服务器。 它应该重build索引文件。 一旦它确实,你确认一切正常工作,你可以删除旧的损坏的。