无法从官方docker镜像启动mysql:设备上没有剩余空间

wlp8pajw  于 2023-06-21  发布在  Mysql
关注(0)|答案(1)|浏览(109)

我只是拉了官方的mysql图像,更准确地说:mysql:8.0.32
使用以下命令会引发错误:

docker run -e MYSQL_ALLOW_EMPTY_PASSWORD=true -d mysql:8.0.32

2023-01-26T10:46:07.380836Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.

2023-01-26T10:46:07.380926Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.32) initializing of server in progress as process 81

mysqld: Error writing file '/var/lib/mysql/auto.cnf' (OS errno 28 - No space left on device)

2023-01-26T10:46:07.386811Z 0 [ERROR] [MY-010076] [Server] Initialization of the server's UUID failed because it could not be read from the auto.cnf file. If this is a new server, the initialization failed because it was not possible to generate a new UUID.

2023-01-26T10:46:07.386835Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.

2023-01-26T10:46:07.386840Z 0 [ERROR] [MY-010119] [Server] Aborting

2023-01-26T10:46:07.387240Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32)  MySQL Community Server - GPL.

2023-01-26 10:46:06+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.32-1.el8 started.

2023-01-26 10:46:07+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'

2023-01-26 10:46:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.32-1.el8 started.

2023-01-26 10:46:07+00:00 [Note] [Entrypoint]: Initializing database files

如您所见,第一个错误指示无法写入文件:

mysqld: Error writing file '/var/lib/mysql/auto.cnf' (OS errno 28 - No space left on device)

但是,在documentation中没有提到任何先决条件。
我该怎么解决这个问题?

avwztpqn

avwztpqn1#

在将一个卷挂载到/var/lib/mysql后,它对我很有效。

相关问题