0

mysql时不时挂掉,无法启动,请问是什么原因啊?

my.cnf配置:

[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
log-error=/alidata/log/mysql/error.log
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
skip-name-resolve

log-bin=mysql-bin
binlog_format=mixed
server-id = 1

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
expire_logs_days = 5
max_binlog_size = 1000M

错误日志log:
170421 14:16:49 mysqld_safe Number of processes running now: 0
170421 14:16:49 mysqld_safe mysqld restarted
2017-04-21 14:16:49 1480 [Note] Plugin 'FEDERATED' is disabled.
2017-04-21 14:16:49 1480 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-04-21 14:16:49 1480 [Note] InnoDB: The InnoDB memory heap is disabled
2017-04-21 14:16:49 1480 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-04-21 14:16:49 1480 [Note] InnoDB: Memory barrier is not used
2017-04-21 14:16:49 1480 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-04-21 14:16:49 1480 [Note] InnoDB: Using Linux native AIO
2017-04-21 14:16:49 1480 [Note] InnoDB: Using CPU crc32 instructions
2017-04-21 14:16:49 1480 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2017-04-21 14:16:49 1480 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2017-04-21 14:16:49 1480 [ERROR] Plugin 'InnoDB' init function returned error.
2017-04-21 14:16:49 1480 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-04-21 14:16:49 1480 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-04-21 14:16:49 1480 [ERROR] Aborting

2017-04-21 14:16:49 1480 [Note] Binlog end
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'partition'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'BLACKHOLE'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_METRICS'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_CMPMEM'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_CMP'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_LOCKS'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'INNODB_TRX'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'ARCHIVE'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'MyISAM'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'CSV'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'MRG_MYISAM'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'MEMORY'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'sha256_password'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'mysql_old_password'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'mysql_native_password'
2017-04-21 14:16:49 1480 [Note] Shutting down plugin 'binlog'
2017-04-21 14:16:49 1480 [Note] /alidata/server/mysql/bin/mysqld: Shutdown complete

170421 14:16:49 mysqld_safe mysqld from pid file /alidata/server/mysql/data/iZ23czua4kgZ.pid ended

6个回答

1

已采纳

内存不够了 都没看到你配置的mysql内存多少 一般占用os的75%

0

InnoDB: Cannot allocate memory for the buffer pool

看看这句,内存不够了。你自己百度的话一定要找准错误信息

0

不设置内存参数innodb_buffer_pool_size的话,5.6以上默认使用128M,内存不够。建议使用低版本5.5或者增加内存

0

内存的问题,不够用了

0

应该是这个原因: Unknown/unsupported storage engine。
也可能是innodb_buffer_pool_size设置太小了。

0

[ERROR] InnoDB: Cannot allocate memory for the buffer pool
错误很明显了,修改您的innodb_buffer_pool_size设置即可。

撰写答案

相似问题