Has been unsuccessful 1. Start mysql, view the error log /var/log/mysql/error.log
2. The main error messages are the following:
1
2
3
4
5
6
7
|
[error] innodb: mmap(136151040 bytes) failed; errno 12
[error] innodb: cannot allocate memory
for
the buffer pool
[error] innodb: plugin initialization aborted
with
error generic error
[error] plugin
'innodb'
init
function
returned error.
[error] plugin
'innodb'
registration
as
a storage engine failed.
[error] failed
to
initialize plugins.
[error] aborting
|
3. After the query is because of insufficient memory, view memory
Increase swap swap space to solve the problem:
1
2
3
|
dd if=/dev/zero
of
=/swapfile bs=1m
count
=1024
mkswap /swapfile
swapon /swapfile
|
4. Increase the automatic loading:
Join / swapfile swap swap defaults 0 0 in the file / etc / fstab in
service mysql start a successful start
5. Remarks:
Generates an empty file
1
2
3
4
5
|
dd if=/dev/zero
of
=1.txt bs=1m
count
=2 生成一个指定大小的空文件
if=文件名:输入文件名
of
=文件名:输出文件名
bs=字节大小
count
=个数
|
to sum up:
Okami 勿喷,