The server quit without updating PID file (/bak/local/mysql/var/file.pid)

来源:互联网 发布:七天网络手机阅卷 编辑:程序博客网 时间:2024/06/07 00:19

出现问题以后第一步先查看日志信息,千万不要瞎子摸象

查看错误日志

错误日志如下:

170524 04:01:04 mysqld_safe mysqld from pid file /bak/local/mysql/var/iZuf6ixy03u72vzno4jsiuZ.pid ended170524 11:34:25 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var2017-05-24 11:34:25 0 [Note] /bak/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 26665 ...2017-05-24 11:34:25 26665 [Note] Plugin 'FEDERATED' is disabled.2017-05-24 11:34:25 26665 [Note] InnoDB: Using atomics to ref count buffer pool pages2017-05-24 11:34:25 26665 [Note] InnoDB: The InnoDB memory heap is disabled2017-05-24 11:34:25 26665 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins2017-05-24 11:34:25 26665 [Note] InnoDB: Memory barrier is not used2017-05-24 11:34:25 26665 [Note] InnoDB: Compressed tables use zlib 1.2.32017-05-24 11:34:26 26665 [Note] InnoDB: Using CPU crc32 instructions2017-05-24 11:34:26 26665 [Note] InnoDB: Initializing buffer pool, size = 512.0MInnoDB: mmap(549453824 bytes) failed; errno 122017-05-24 11:34:26 26665 [ERROR] InnoDB: Cannot allocate memory for the buffer pool2017-05-24 11:34:26 26665 [ERROR] Plugin 'InnoDB' init function returned error.2017-05-24 11:34:26 26665 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.2017-05-24 11:34:26 26665 [ERROR] Unknown/unsupported storage engine: INNODB2017-05-24 11:34:26 26665 [ERROR] Aborting

提示是innodb内存错误,无法分配的缓冲池。直接修改innodb的缓中池即可

修改innodb_buffer_pool_size的值

将以前为512M修改成1024M

default_storage_engine = InnoDBinnodb_data_home_dir = /bak/local/mysql/varinnodb_data_file_path = ibdata1:10M:autoextendinnodb_log_group_home_dir = /bak/local/mysql/varinnodb_buffer_pool_size = 1024Minnodb_log_file_size = 128Minnodb_log_buffer_size = 8Minnodb_flush_log_at_trx_commit = 1innodb_lock_wait_timeout = 50

但发现一个问题,另一台服务器的配置如下,但没有发生过以上错误,目前没有找到原因。

# Uncomment the following if you are using InnoDB tablesinnodb_data_home_dir = /bak/mysql/varinnodb_data_file_path = ibdata1:10M:autoextendinnodb_log_group_home_dir = /bak/mysql/var# You can set .._buffer_pool_size up to 50 - 80 %# of RAM but beware of setting memory usage too highinnodb_buffer_pool_size = 16Minnodb_additional_mem_pool_size = 2M# Set .._log_file_size to 25 % of buffer pool sizeinnodb_log_file_size = 5Minnodb_log_buffer_size = 8Minnodb_flush_log_at_trx_commit = 1innodb_lock_wait_timeout = 50innodb_force_recovery = 0
阅读全文
0 0
原创粉丝点击