docker-library / mysql

Docker Official Image packaging for MySQL Community Server
https://dev.mysql.com/
GNU General Public License v2.0
2.46k stars 2.19k forks source link

Docker character-set and collation-server problem after update #1060

Closed chmat0s closed 4 months ago

chmat0s commented 4 months ago

Hi,

I have problem, after automatic update by watchtower in docker mysql wont start.

Pull command: docker run --name mysql-server-01 -it --network=zabbix-net -p 192.168.5.32:3306:3306 -v mysql-server-01:/var/lib/mysql -e MYSQL_DATABASE="zabbix" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="secretpassword" -e MYSQL_ROOT_PASSWORD="secretpassword" -d mysql --character-set-server=utf8 --collation-server=utf8_bin --mysql_native_password=ON --restart always

Log: 2024-05-13 08:17:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started. 2024-05-13 08:17:13+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2024-05-13 08:17:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started. '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock' 2024-05-13T08:17:13.750407Z 0 [System] [MY-015015] [Server] MySQL Server - start. 2024-05-13T08:17:14.031302Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 1 2024-05-13T08:17:14.032889Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. 2024-05-13T08:17:14.032895Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8mb3_bin' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead. 2024-05-13T08:17:14.038211Z 0 [Warning] [MY-010001] [Server] Can't create thread to handle bootstrap (errno: 1) 2024-05-13T08:17:14.038265Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2024-05-13T08:17:14.038279Z 0 [ERROR] [MY-010119] [Server] Aborting 2024-05-13T08:17:14.039865Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0) MySQL Community Server - GPL. 2024-05-13T08:17:14.039891Z 0 [System] [MY-015016] [Server] MySQL Server - end.

When I change pull command to docker run --name mysql-server-01 -it --network=zabbix-net -p 192.168.5.32:3306:3306 -v mysql-server-01:/var/lib/mysql -e MYSQL_DATABASE="zabbix" -e MYSQL_USER="zabbix" -e MYSQL_PASSWORD="secretpassword" -e MYSQL_ROOT_PASSWORD="secretpassword" -d mysql --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --mysql_native_password=ON --restart always

Mysql wont start too: 2024-05-13 08:57:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started. 2024-05-13 08:57:11+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2024-05-13 08:57:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started. '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock' 2024-05-13T08:57:11.979599Z 0 [System] [MY-015015] [Server] MySQL Server - start. 2024-05-13T08:57:12.256626Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 1 2024-05-13T08:57:12.262892Z 0 [Warning] [MY-010001] [Server] Can't create thread to handle bootstrap (errno: 1) 2024-05-13T08:57:12.262953Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2024-05-13T08:57:12.262970Z 0 [ERROR] [MY-010119] [Server] Aborting 2024-05-13T08:57:12.264710Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0) MySQL Community Server - GPL. 2024-05-13T08:57:12.264734Z 0 [System] [MY-015016] [Server] MySQL Server - end.

yosifkit commented 4 months ago

Possibly https://github.com/docker-library/mysql/issues/1058#issuecomment-2105000516. You can also try mysql:8.4-oraclelinux8 to see if that runs correctly

chmat0s commented 4 months ago

Hi, thank you very much! It is working!

chmat0s commented 4 months ago

Now is ok.