Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker 8.4.0 swarm deploy start error: Data Dictionary initialization failed. #1061

Closed
CxistHans opened this issue May 14, 2024 · 6 comments
Closed

Comments

@CxistHans
Copy link

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

@CxistHans
Copy link
Author

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)

@CxistHans
Copy link
Author

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

@spnv
Copy link

spnv commented May 14, 2024

same here

@tianon
Copy link
Member

tianon commented May 14, 2024

See #1056, #1058, and #1060, at least one of which this is definitely a duplicate of.

@CxistHans
Copy link
Author

@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)

@yosifkit
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants