我只是拉了官方的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中没有提到任何先决条件。
我该怎么解决这个问题?
1条答案
按热度按时间avwztpqn1#
在将一个卷挂载到
/var/lib/mysql
后,它对我很有效。