<div style="text-indent: 2em;">
最近入了一个digitalocean最低配置512m的服务器,rpm安装完启动服务报错:<br>
<pre> Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/warscat.pid).<br>
<br>
<br>
</pre>
于是就去看看log发现了以下问题<br>
<pre>2016-09-20 13:54:28 14957 [Note] InnoDB: Initializing buffer pool, size = 256.0M;<br>
InnoDB: mmap(274726912 bytes) failed; errno 12<br>
2016-09-20 13:54:28 14957 [ERROR] InnoDB: Cannot allocate memory for the buffer pool<br>
2016-09-20 13:54:28 14957 [ERROR] Plugin 'InnoDB' init function returned error.<br>
2016-09-20 13:54:28 14957 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.<br>
2016-09-20 13:54:28 14957 [ERROR] Unknown/unsupported storage engine: InnoDB<br>
2016-09-20 13:54:28 14957 [ERROR] Aborting<br>
</pre>
<h1>那么这就好尴尬了。。。</h1>
<br>
最后改了一下my.cnf再次启动正常 512真的不够玩的-。- 上配置文件<br>
[client]<br>
port = 3306<br>
socket = /tmp/mysql.sock<br>
[mysqld]<br>
port = 3306<br>
socket = /tmp/mysql.sock<br>
skip-external-locking<br>
key_buffer_size = 256M<br>
max_allowed_packet = 1M<br>
table_open_cache = 256<br>
sort_buffer_size = 1M<br>
read_buffer_size = 1M<br>
read_rnd_buffer_size = 4M<br>
myisam_sort_buffer_size = 64M<br>
thread_cache_size = 8<br>
query_cache_size= 16M<br>
thread_concurrency = 8<br>
log-bin=mysql-bin<br>
binlog_format=mixed<br>
server-id = 1<br>
[mysqldump]<br>
quick<br>
max_allowed_packet = 16M<br>
[mysql]<br>
no-auto-rehash<br>
[myisamchk]<br>
key_buffer_size = 128M<br>
sort_buffer_size = 128M<br>
<br>
read_buffer = 2M<br>
<h1>好像pre标签没用?</h1>
</div>
关于Centos下The server quit without updating PID file (/var/l
最新推荐文章于 2025-06-19 14:27:27 发布