docker 8.4.0 swarm deploy start error: Data Dictionary initialization failed.
CxistHans opened this issue · comments
yaml
mysqlnew:
image: mysql:8.4.0
user: mysql
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "100"
networks:
overlay:
aliases:
- sdcc3-base-mysql
deploy:
mode: global
update_config:
failure_action: rollback
order: stop-first
placement:
constraints:
- node.role == manager
ports:
- 12004:3306
environment:
- TZ=Asia/Shanghai
- MYSQL_ROOT_PASSWORD=MHgaLU4jGRC
- MYSQL_USER=ssfd
- MYSQL_PASSWORD=MHgaLU4jGRC
volumes:
- /data/docker/mysqlnew/data:/var/lib/mysql
- /data/docker/mysqlnew/mysql.cnf:/etc/mysql/my.cnf
- /data/docker/mysqlnew/log:/var/log/mysql
sh
mkdir -p /data/docker/mysqlnew/data
mkdir -p /data/docker/mysqlnew/log
touch /data/docker/mysqlnew/log/{mysql_error.log,mysql.log,mysql_slow.log}
chown -R 999:999 /data/docker/mysqlnew/data
chown -R 999:999 /data/docker/mysqlnew/log
mysql_errorlog
2024-05-14T09:21:51.994528Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2024-05-14T09:21:51.996911Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.4.0) initializing of server in progress as process 42
2024-05-14T09:21:52.008587Z 0 [Warning] [MY-010001] [Server] Can't create thread to handle bootstrap (errno: 1)
2024-05-14T09:21:52.008672Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2024-05-14T09:21:52.008687Z 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.
2024-05-14T09:21:52.008698Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-14T09:21:52.010143Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
info
docker version: 20.10.8
cat /etc/os-release
NAME="openEuler"
VERSION="22.09"
ID="openEuler"
VERSION_ID="22.09"
PRETTY_NAME="openEuler 22.09"
ANSI_COLOR="0;31"
cat /proc/version
Linux version 5.10.0-106.18.0.68.oe2209.x86_64 (abuild@obs-worker1639015616-x86-0017) (gcc_old (GCC) 10.3.1, GNU ld (GNU Binutils) 2.37) #1 SMP Wed Sep 28 07:03:00 UTC 2022
chown -R 999:999
because:
[root@localhost data]# docker run -i mysql:8.4.0 id mysql
uid=999(mysql) gid=999(mysql) groups=999(mysql)
mysql.cnf
[client]
port = 3306
default-character-set = utf8mb4
[mysql]
port = 3306
default-character-set = utf8mb4
[mysqld]
#bind-address = 0.0.0.0
#port = 3306
max_connections = 10000
max_user_connections= 1000
#log
log_error=/var/log/mysql/mysql_error.log
general_log_file=/var/log/mysql/mysql.log
general_log=0
slow_query_log=1
slow_query_log_file=/var/log/mysql/mysql_slow.log
long_query_time=1
log_queries_not_using_indexes=0
##########################
# character set
##########################
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
same here
@tianon Try 8.4.0-oraclelinux8 and it does start successfully. But I would like to ask what is the difference from 8.4.0 tag? 8.4.0-oraclelinux8 is recommended for production use?
via: #1060 (comment) #1058 (comment)
8.4.0
in now equal to 8.4.0-oraclelinux9
. 8.4.0-oraclelinux8
will likely receive no further updates. Currently there is no plan to maintain both the Oracle Linux 8 and Oracle Linux 9 variants, just OL9. But that could change: #1055 (comment).