1 》查看原因
120308 12:29:01 [Note] /usr/libexec/mysqld: Shutdown complete
120308 12:29:01 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
120308 12:36:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120308 12:36:46 [Note] Plugin 'FEDERATED' is disabled.
120308 12:36:46 InnoDB: The InnoDB memory heap is disabled
120308 12:36:46 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
120308 12:36:46 InnoDB: Compressed tables use zlib 1.2.3
120308 12:36:46 InnoDB: Using Linux native AIO
/usr/libexec/mysqld: Can't create/write to file '/tmp/ibmedH00' (Errcode: 13)
120308 12:36:46 InnoDB: Error: unable to create temporary file; errno: 13
120308 12:36:46 [ERROR] Plugin 'InnoDB' init function returned error.
120308 12:36:46 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120308 12:36:46 [ERROR] Unknown/unsupported storage engine: InnoDB
120308 12:36:46 [ERROR] Aborting
120308 12:36:46 [Note] /usr/libexec/mysqld: Shutdown complete
120308 12:36:46 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ende
2》分析 /tmp 目录没有权限:
总结:mysql 主义数据库的权限问题:chmod 777 -r /var/lib/mysql;
注意数据库用户:chown -R mysql:mysql /var/lib/mysql
查看log,var/log/mysqld.log
[root@localhost mysql]# tail -n 20 /var/log/mysqld.log
120308 12:29:01 [Note] /usr/libexec/mysqld: Shutdown complete
120308 12:29:01 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
120308 12:36:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120308 12:36:46 [Note] Plugin 'FEDERATED' is disabled.
120308 12:36:46 InnoDB: The InnoDB memory heap is disabled
120308 12:36:46 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
120308 12:36:46 InnoDB: Compressed tables use zlib 1.2.3
120308 12:36:46 InnoDB: Using Linux native AIO
/usr/libexec/mysqld: Can't create/write to file '/tmp/ibmedH00' (Errcode: 13)
120308 12:36:46 InnoDB: Error: unable to create temporary file; errno: 13
120308 12:36:46 [ERROR] Plugin 'InnoDB' init function returned error.
120308 12:36:46 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120308 12:36:46 [ERROR] Unknown/unsupported storage engine: InnoDB
120308 12:36:46 [ERROR] Aborting
120308 12:36:46 [Note] /usr/libexec/mysqld: Shutdown complete
120308 12:36:46 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ende
2》分析 /tmp 目录没有权限:
chmod 777 /tmp
总结:mysql 主义数据库的权限问题:chmod 777 -r /var/lib/mysql;
注意数据库用户:chown -R mysql:mysql /var/lib/mysql
查看log,var/log/mysqld.log