问题 机器上mysql挂了 重启也没用 那马上看log 这个是一定的啦 出事看log
[root@ ~]# cat mysql/data/git-shop.err
150915 15:02:15 mysqld_safe Starting mysqld daemon with databases from /mysql/data/
150915 15:02:16 InnoDB: The InnoDB memory heap is disabled
150915 15:02:16 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150915 15:02:16 InnoDB: Compressed tables use zlib 1.2.7
150915 15:02:16 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
150915 15:02:16 InnoDB: Completed initialization of buffer pool
150915 15:02:16 InnoDB: Fatal error: cannot allocate memory for the buffer pool
150915 15:02:16 [ERROR] Plugin ‘InnoDB’ init function returned error.
150915 15:02:16 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
150915 15:02:16 [ERROR] Unknown/unsupported storage engine: InnoDB
150915 15:02:16 [ERROR] Aborting
150915 15:02:16 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
150915 15:02:16 mysqld_safe mysqld from pid file/mysql/data//git-shop.pid ended
150915 15:03:51 mysqld_safe Starting mysqld daemon with databases from /mysql/data/
150915 15:03:51 InnoDB: The InnoDB memory heap is disabled
150915 15:03:51 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150915 15:03:51 InnoDB: Compressed tables use zlib 1.2.7
150915 15:03:51 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
150915 15:03:51 InnoDB: Completed initialization of buffer pool
150915 15:03:51 InnoDB: Fatal error: cannot allocate memory for the buffer pool
150915 15:03:51 [ERROR] Plugin ‘InnoDB’ init function returned error.
150915 15:03:51 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
150915 15:03:51 [ERROR] Unknown/unsupported storage engine: InnoDB
150915 15:03:51 [ERROR] Aborting
150915 15:03:51 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
##后来改了还老是这个提示 直接重启机器 好了
150915 15:03:51 mysqld_safe mysqld from pid file /mysql/data//git.pid ended
解决
修改my.cnf ,设置innodb_buffer_pool_size=8M
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
http://houzhiqingjava.blog.163.com/blog/static/1673995072014984715393/
http://www.tuicool.com/articles/qm2Erq
http://www.cnblogs.com/zsmynl/p/3602319.html
http://www.cnblogs.com/hikarusun/p/3740431.html