You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: skip-host-cache option removed in latest MySQL 8.3.0 version #8130
Github-hosted runner. Cannot check the docker version.
What happened?
The latest mysql contanier 8.3.0 does not work anymore with testcontainers. It complains about an unknown config option - '--skip-host-cache'.
Tests with previous versions work fines. I don't see mention of any change to this config parameter in the 8.3.0 release notes though.
Error: -19T04:32:46.946550Z 0 [ERROR] [MY-000068] [Server] unknown option '--skip-host-cache'.
Error: -19T04:32:46.946911Z 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.
Error: -19T04:32:46.946926Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-01-19T04:32:48.385535Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
Replace the line with skip-host-cache with host_cache_size=0
After that, tests work again.
Reacted by Swaroop Raghupathy, Dennis Neufeld, Andrew Rowley, Manuel de la Peña, hoduulmu, Andrzej Wąsowski, Aitor, Sergiy Morenets, Elizaveta and Chen Jian
My current workaround is to use mysql 8.2.0 specifically in my application-test.yml file (this is for the unit testing of a Spring Boot application): jdbc-url: jdbc:tc:mysql:8.2.0:///;databaseName=<database>?user=<user>&password=<password>
Activity
rowleya commentedon Jan 19, 2024
I am also seeing this behaviour:
Failed job: https://github.com/SpiNNakerManchester/JavaSpiNNaker/actions/runs/7581397438/job/20648969510
wimdeblauwe commentedon Jan 19, 2024
Running into this as well. The release note of 8.0.30 does mention the deprecation of the parameter:
But indeed nothing about the actual removal in the 8.3.0 release notes.
wimdeblauwe commentedon Jan 19, 2024
This PR seems to be related: docker-library/mysql#1002
They replaced
skip-host-cachewithhost_cache_size=0which is probably what will fix it here as well.wimdeblauwe commentedon Jan 19, 2024
This is a workaround that seems to work for me:
src/main/resources/mysql-default-conf/my.cnffile in your projectskip-host-cachewithhost_cache_size=0After that, tests work again.
rowleya commentedon Jan 19, 2024
My current workaround is to use mysql 8.2.0 specifically in my application-test.yml file (this is for the unit testing of a Spring Boot application):
jdbc-url: jdbc:tc:mysql:8.2.0:///;databaseName=<database>?user=<user>&password=<password>Pin test MySQL to 8.2
Remove use of deprecated (removed in 8.3) MySQL config option (testco…
Fix default configuration file in mysql (#8131)
chore: workaround for testcontainers/testcontainers-java#8130
Fix testcontainers + MySQL bug
Fix testcontainers + MySQL bug
Fix default configuration file in mysql (testcontainers#8131)