环境:centos+mysql5.5
启动报异常:
[root@shizhanmini init.d]# /etc/init.d/mysql start
Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/shizhanmini.pid).
查看错误日志((/var/lib/mysql/*.err):
160921 10:04:43 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160921 10:04:43 [Note] /usr/sbin/mysqld (mysqld 5.5.48) starting as process 1794 ...
160921 10:04:43 [Note] Plugin 'FEDERATED' is disabled.
160921 10:04:43 InnoDB: The InnoDB memory heap is disabled
160921 10:04:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160921 10:04:43 InnoDB: Compressed tables use zlib 1.2.3
160921 10:04:43 InnoDB: Using Linux native AIO
160921 10:04:43 InnoDB: Initializing buffer pool, size = 128.0M
160921 10:04:43 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file ./ibdata1
160921 10:04:43 InnoDB: Could not open or create data files.
160921 10:04:43 InnoDB: If you tried to add new data files, and it failed here,
160921 10:04:43 InnoDB: you should now edit innodb_data_file_path in my.cnf back
160921 10:04:43 InnoDB: to what it was, and remove the new ibdata files InnoDB created
160921 10:04:43 InnoDB: in this failed attempt. InnoDB only wrote those files full of
160921 10:04:43 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
160921 10:04:43 InnoDB: remove old data files which contain your precious data!
160921 10:04:43 [ERROR] Plugin 'InnoDB' init function returned error.
160921 10:04:43 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160921 10:04:43 [ERROR] Unknown/unsupported storage engine: InnoDB
160921 10:04:43 [ERROR] Aborting
解决方法:
1.进入cd /var/lib/mysql/
2.rm -rf ib*
3.service mysql start
注意:
/var/lib/mysql/ 权限问题
如下图(ll)
drwxr-xr-x. 12 mysql mysql 4096 9月 29 09:27 mysql
提示:
[root@shizhanmini mysql]# service mysql start
Starting MySQL... SUCCESS!