mysql-設定 - MySQL錯誤,時不時自動掛掉,無法啟動
仅有的幸福
仅有的幸福 2017-05-18 10:55:52
0
6
756

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_pa​​cket = 1M
table_open_cache = 64
sort_buffer_size = 512K#net_net_b; 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_pa​​cket = 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 mysqld_safe mysqld restarted
2017-04-21 19486: 4 [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 194:16:44 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:17-14:17-14: 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-0- Compressed tables use zlib 1.2.3
2017-0- 2016 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 1482017-04-21 14:16:49 1 ] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2017-04-21 14:16:49 1480 [ERROR] Innoory forsuffer alno. pool
2017-04-21 14:16:49 1480 [ERROR] Plugin 'InnoDB' init function returned error.
2017-04-21 14:16:49 1480 [ERROR] Plugin' a STORAGE ENGINE failed.
2017-04-21 14:16:49 1480 [ERROR] Unknown/unsupported storage engine: InnoDB

2017-04-21 14:16:49 1480 [#2017-04-21 14:16:49 1480 [ER#ROR.

2017-04-21 14:16:49 1480 [注意] Binlog結束
2017-04-21 14:16:49 1480 [注意] 關閉插件'分區'
2017-04-21 1480 [注意] 關閉插件'分區'
2017-04-21 14 :16:49 1480 [注意] 關閉插件'PERFORMANCE_SCHEMA'
2017-04-21 14:16:49 1480 [注意] 關閉插件'BLACKHOLE'
2017-04-21 14:16: 49 148049 14:16: 49注意] 關閉外掛程式'INNODB_SYS_DATAFILES'
2017-04-21 14:16:49 1480 [注意] 關閉外掛程式'INNODB_SYS_TABLESPACES'
2017-04-21 14:16:49 注意'
2017-04-21 14:16:49 1480 [注意] 關閉插件'INNODB_SYS_FOREIGN'
2017-04-21 14:16:49 1480 [注意] 關閉插件'INNODB_SYS_FIELDS'##2017-# 04-21 14:16:49 1480 [注意] 關閉插件'INNODB_SYS_COLUMNS'
2017-04-21 14:16:49 1480 [注意] 關閉插件'INNODB_SYS_INDEXES'
2017-04-164:164-16 :49 1480 [注意] 關閉插件'INNODB_SYS_TABLESTATS'
2017-04-21 14:16:49 1480 [注意] 關閉插件'INNODB_SYS_TABLES'
2017- 04-21 14:1604 [注意]關閉外掛程式'INNODB_FT_INDEX_TABLE'
2017-04-21 14:16:49 1480 [注意] 關閉外掛程式'INNODB_FT_INDEX_CACHE'
2017-04-21 14 :16:49 1480 [FT49 14806:49] ##2017-04-21 14:16:49 1480 [注意] 關閉插件'INNODB_FT_BEING_DELETED'
2017-04-21 14:16:49 1480 [注意] 關閉插件'INNODB_FT_DELETED' 21 14:16:49 1480 [注意] 關閉插件'INNODB_FT_DEFAULT_STOPWORD'
2017-04-21 14:16:49 1480 [注意]關閉插件'INNODB_METRICS'
2017-0480 [注意]關閉插件'INNODB_METRICS'
2017-0441:146 1480 [注意] 關閉插件'INNODB_BUFFER_POOL_STATS'
2017-04-21 14:16:49 1480 [注意] 關閉插件 ' INNODB_BUFFER_PAGE_LRU'
2017-04-21 14:166:480 'INNODB_BUFFER_PAGE'
2017-04-21 14:16:49 1480 [注意] 關閉外掛程式'INNODB_CMP_PER_INDEX_RESET'
2017-04-21 14:16:49 1480 [R] PER148021 14:16:49 1480 [R] PER4802190 2017-04-21 14:16:49 1480 [注意] 關閉插件'INNODB_CMPMEM_RESET'
2017-04 -21 14:16:49 1480 [注意] 關閉插件'INNODB_CMPMEM'
2017-04-21171 :16:49 1480 [注意] 關閉插件'INNODB_CMP_RESET'
2017-04-21 14: 16:49 1480 [注意] 關閉外掛程式'INNODB_CMP'
2017-04-21 14:16:49148注意] 關閉插件'INNODB_LOCK_WAITS'
2017-04-21 14:16:49 1480 [注意] 關閉插件'INNODB_LOCKS'
2017-04-21 14:16:49 1480 [INNO: 關閉插件X' '
2017-04-21 14:16:49 1480 [注意] 關閉down 插件'ARCHIVE'
2017-04-21 14:16:49 1480 [注意] 關閉插件'MyISAM'
2017 -04-21 14:16:49 1480 [注意] 關閉插件'CSV '
2017-04-21 14:16:49 1480 [注意] 關閉插件'MRG_MYISAM'
2017-04-21 14: 16:49 1480 [注意] 關閉插件'MEMORY'
2017-04-21 14:16:49 1480 [注意] 關閉插件'sha256_password'
2017-04-21 14:16:49 1480 [注意] 關閉外掛程式'mysql_old_password'
2017-04- 21 14:16:49 1480 [注意] 關閉外掛程式 'mysql_native_password'
2017-04-21 14:16:49 1480 [注意] 關閉外掛程式 'binlog'
2017-04-21 14:16:49 1480 [注意] /alidata/server/mysql/bin/mysqld: 完成完成完成#sqld

##170421 14:16:49 來自 pid 檔案 /alidata/server/mysql/data/iZ23czua4kgZ.pid 的 mysqld_safe mysqld 結束

仅有的幸福
仅有的幸福

全部回覆(6)
迷茫

記憶體不夠了 都沒看到你配置的mysql記憶體多少 一般佔用os的75%

淡淡烟草味

InnoDB: Cannot allocate memory for the buffer pool

看看這句,內存不夠了。你自己百度的話一定要找準錯誤訊息

某草草

不設定記憶體參數innodb_buffer_pool_size的話,5.6以上預設使用128M,記憶體不夠。建議使用低版本5.5或增加記憶體

滿天的星座

記憶體的問題,不夠用了

小葫芦

應該是這個原因: Unknown/unsupported storage engine。
也可能是innodb_buffer_pool_size設定太小了。

小葫芦

[ERROR] InnoDB: Cannot allocate memory for the buffer pool
錯誤很明顯了,修改您的innodb_buffer_pool_size設定即可。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板