docker-library / mysql

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

Update Docker Image mysql 8.0.37 #1058

Closed guioliveiradevops closed 2 months ago

guioliveiradevops commented 6 months ago

We use MySQL with Docker compose natively, and this morning all our environments that used the 8.0.37 image started to have problems.

Initially we thought our data was corrupt, as the error was this:

2024-05-10T10:53:12.117548210Z 2024-05-10T10:53:12.115741Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.37) starting as process 1
2024-05-10T10:53:12.119773190Z 2024-05-10T10:53:12.119706Z 0 [Warning] [MY-010001] [Server] Can't create thread to handle bootstrap (errno: 1)
2024-05-10T10:53:12.119780200Z 2024-05-10T10:53:12.119738Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2024-05-10T10:53:12.119783150Z 2024-05-10T10:53:12.119744Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-10T10:53:12.120094961Z 2024-05-10T10:53:12.120041Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.37)  MySQL Community Server - GPL.

And also when starting a new MySQL without any data, the following error appears:

2024-05-10T10:55:10.763707498Z 2024-05-10T10:55:10.761923Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.37) initializing of server in progress as process 80
2024-05-10T10:55:10.763710838Z 2024-05-10T10:55:10.763561Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2024-05-10T10:55:10.763713338Z 2024-05-10T10:55:10.763567Z 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-10T10:55:10.764046169Z 2024-05-10T10:55:10.763621Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-10T10:55:10.764059339Z 2024-05-10T10:55:10.763764Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.37)  MySQL Community Server - GPL.

Apparently, all because of this update: image

This created a very serious problem for us, as we thought the data was corrupt.

If this helps anyone with the same problem, we had to update to 8.1 and we were successful.

tianon commented 6 months ago

Sounds similar to #1056 and thus might be #1055

yosifkit commented 6 months ago

2024-05-10T10:53:12.119773190Z 2024-05-10T10:53:12.119706Z 0 [Warning] [MY-010001] [Server] Can't create thread to handle bootstrap (errno: 1)

That sounds like libseccomp; try with --security-opt seccomp=unconfined. If it works, then Docker, runc, and libseccomp need to be updated on the host.

https://github.com/docker-library/python/issues/837#issuecomment-1599640563

anatol06 commented 6 months ago

We use MySQL with Docker compose natively, and this morning all our environments that used the 8.0.37 image started to have problems. ... This created a very serious problem for us, as we thought the data was corrupt.

If this helps anyone with the same problem, we had to update to 8.1 and we were successful.

Thanks for sharing! I have the same issue with mysql:8.0.36-debian image as well. Update to mysql:8.0.37-debian did not help. If you say that 8.1 solved your issue, I would be very happy to test it, but I need mysql:8.1-debian which unfortunately is missing at this moment. Is there any chance to have it available soon?

yosifkit commented 6 months ago

8.1 was the first "innovation" release and is no longer updated (it was superseded by 8.2 and then 8.3 and now 8.4). After 8.0 we stopped publishing Debian based images and only publish Oracle Linux based images since it is more supported by MySQL upstream releases.

Edit: 8.0 is still an active release and the images will continue to be built (on Debian and Oracle Linux) until its end of life.

zzhaaa123 commented 3 months ago

I have the same issue ,when i upgrade my docker from 19.03.9 to 26.1.4,it had been solved.

KansaiTraining commented 2 months ago

--security-opt seccomp=unconfined

try what with seccomp? docker compose does not have that flag

anatol06 commented 2 months ago

I resolved all issues by switching to the Bitnami MySQL container images across all my servers.

tianon commented 2 months ago

--security-opt seccomp=unconfined

try what with seccomp? docker compose does not have that flag

https://docs.docker.com/reference/compose-file/services/#security_opt