MySQL错误,时不时自动挂掉,无法启动

发布于 2022-09-04 20:24:11 字数 5444 浏览 17 评论 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

番薯 2022-09-11 20:24:11

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

独行侠 2022-09-11 20:24:11

InnoDB: Cannot allocate memory for the buffer pool

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

无妨# 2022-09-11 20:24:11

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

暗喜 2022-09-11 20:24:11

内存的问题,不够用了

黄昏下泛黄的笔记 2022-09-11 20:24:11

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

川水往事 2022-09-11 20:24:11

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文