没有合适的资源?快使用搜索试试~ 我知道了~
docker 启动mysql 成功又退出,无法正常启动.pdf
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 56 浏览量
2021-12-16
21:40:51
上传
评论
收藏 39KB PDF 举报
温馨提示
试读
1页
docker 启动mysql 成功又退出,无法正常启动
资源推荐
资源详情
资源评论
docker 启动启动mysql 成功又退出,无法正常启动成功又退出,无法正常启动
user@host:$ docker logs mysql:5.7
2021-11-30 02:36:51+00:00 [ERROR] [Entrypoint]: Unable to start server.
2021-11-30 02:36:51+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.36-1debian10 started.
2021-11-30 02:36:52+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-11-30 02:36:52+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.36-1debian10 started.
2021-11-30T02:36:52.425362Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more
2021-11-30T02:36:52.428531Z 0 [Note] mysqld (mysqld 5.7.36) starting as process 1 ...
2021-11-30T02:36:52.435830Z 0 [Note] InnoDB: PUNCH HOLE support available
2021-11-30T02:36:52.435859Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-11-30T02:36:52.435863Z 0 [Note] InnoDB: Uses event mutexes
2021-11-30T02:36:52.435867Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-11-30T02:36:52.435870Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-11-30T02:36:52.435873Z 0 [Note] InnoDB: Using Linux native AIO
2021-11-30T02:36:52.438293Z 0 [Note] InnoDB: Number of pools: 1
2021-11-30T02:36:52.442858Z 0 [Note] InnoDB: Using CPU crc32 instructions
2021-11-30T02:36:52.448428Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-11-30T02:36:52.449553Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12
2021-11-30T02:36:52.449571Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2021-11-30T02:36:52.449576Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-11-30T02:36:52.449582Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-11-30T02:36:52.449587Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-11-30T02:36:52.449593Z 0 [ERROR] Failed to initialize builtin plugins.
2021-11-30T02:36:52.449597Z 0 [ERROR] Aborting
2021-11-30T02:36:52.449602Z 0 [Note] Binlog end
2021-11-30T02:36:52.449655Z 0 [Note] Shutting down plugin 'CSV'
2021-11-30T02:36:52.450691Z 0 [Note] mysqld: Shutdown complete
【原因】
虚拟内存不够,无法启动mysql
【检查方法】
user@host:$ free
total used free shared buff/cache available
Mem: 987520 620656 129800 4908 237064 199376
Swap: 0 0 0
【解决方法】
启动swap
user@host:$ dd if=/dev/zero of=/swapfile bs=1M count=1024
024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 6.63477 s, 162 MB/s
user@host:$ mkswap /swapfile
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=46f2c2e7-102f-4faf-9691-f7e6139855ff
user@host:$ swapon /swapfile
swapon: /swapfile: insecure permissions 0644, 0600 suggested.
重启容器
user@host:$ docker start mysql
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
16f276y7d93 mysql:5.7 "docker-entrypoint.s…" 30 minutes ago Up 5 seconds 127.0.0.1:3306->3306/tcp mysql
资源评论
一诺网络技术
- 粉丝: 0
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功