I need help on how to start the mysql server. The problem arise when the root directory was full. To be able to login to directadmin and start mysql, I added a soft link of the /var/lib/mysql/ to /home/mysql. Since my database used up the database. / directory has 50Gb and /home has 1.5Gb. But still I cannot start mysql.

I run /etc/init.d/mysqld status, below is the result:

MySQL is not running, but lock file (/var/lock/subsys/mysql)

I tried removing the file /var/lock/subsys/mysql

But when I tried to start mysql, it give me this result below:

[root@fst /]# /etc/init.d/mysqld start
Starting MySQL.The server quit without updating PID file (/var/lib/mysql/fst.srv.net.pid).

I already check the permissions and file owner of mysql but with the same result.

chmod 755 -R /var/lib/mysql
chown mysql:root /var/lib/mysql

I also cannot locate mysql.sock. But I guess it will be created by mysql when it starts.

Below is the content of the error logs

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

It puzzles me what the problem is. Kindly extend your help to me. I have been researching this problem for two days now.

  • mysql database files are in /var/lib/mysql, have you copied those files to the new /var/lib/mysql folder (/home/mysql)? – Laurentiu Roescu Dec 12 '12 at 7:43
  • @LaurentiuRoescu I move first the /var/lib/mysql to /var/lib/mysql.mark before i create the soflinks. then move the file from /var/lib/mysql.mark back to /var/lib/mysql. I guess that way it is copied. – Pelang Dec 12 '12 at 7:47

It looks like your InnoDB indexes are corrupted.

InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
121212  1:04:22 InnoDB: Could not open or create data files.

Try moving the /var/lib/mysql/ibdata1, /var/lib/mysql/ibdata2 and so on to another directory and start the server again. It should rebuild the index files. Once it did and you verified everything is working again, you can remove the old corrupted ones.

  • thanks. I remove the /var/lib/mysql/ibdata1 and mysql now starts. i will try to verify if my data is there. – Pelang Dec 13 '12 at 2:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.