WP的buffer pool报错导致数据库Error的解决方法

首先查看错误日志

1
2
Cd /var/log
Tail -n 500 mysqld.log

发现错误是:

1
2
3
4
5
6
7
8
2018-11-11T09:08:20.364026Z 0 [Note] InnoDB: Initializing buffer pool, total size = 50M, instances = 1, chunk size = 50M
2018-11-11T09:08:21.751200Z 0 [ERROR] InnoDB: mmap(53690368 bytes) failed; errno 12
2018-11-11T09:08:21.751262Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2018-11-11T09:08:21.751274Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-11-11T09:08:22.220815Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-11-11T09:08:22.526092Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-11-11T09:08:22.526142Z 0 [ERROR] Failed to initialize builtin plugins.
2018-11-11T09:08:22.526159Z 0 [ERROR] Aborting

导致的 Wp Error establishing a database connection problem
解决方法:改mysql的设置

Read more