mysql icon indicating copy to clipboard operation
mysql copied to clipboard

mysql:5.7 is broken

Open lindevel opened this issue 3 years ago • 7 comments

If you have 17 GB of free memory it will start (and use 17Gb of memory), if you don't have that much free memory it will fail with the following error:

mysql-1    | 2023-07-04 11:41:23+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.42-1.el7 started.
mysql-1    | 2023-07-04 11:41:44+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
mysql-1    | 	command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.TEq7KCCdzr
mysql-1    | 	
mysql-1 exited with code 1

It also uses a lot of CPU on startup. 8.0 works without these problems

lindevel avatar Jul 04 '23 11:07 lindevel

Last non-broken version: 5.7.7

lindevel avatar Jul 04 '23 12:07 lindevel

See https://github.com/docker-library/mysql/issues/840, https://github.com/docker-library/mysql/issues/971, and possibly others for similar possibly related/duplicate issues.

tianon avatar Jul 05 '23 17:07 tianon

⚠️ Warning: downgrading to 5.7.7 from other 5.7.x version might not work for the DB with the existing data.

Upgrade to 8.0.x fixed the issue in my case and worked well with the existing DB data

vi7 avatar Sep 06 '23 11:09 vi7

As I understand it correctly, mysql 5.7.43 spawns 70% of RAM and don't want to read innodb_buffer_pool_size configuration settings. Meanwhile 5.3.37-5.7.43 has some sort of memory leak and will be killed by OOM. 5.3.36 fills 70% RAM, and than calmly reduces to 48%. Anyway this behaviour is not fine without any databases (!).

andrew-aladjev avatar Sep 27 '23 11:09 andrew-aladjev

https://forums.docker.com/t/mysql-5-7-docker-image-breaks-the-system/132678/3

Add these setting to solved the issue:

mysql:
  image: mysql:5.7
  ulimits:
    nofile:
      soft: "65536"
      hard: "65536"

Worked in Manjaro / ArchLinux

smoothdvd avatar Oct 24 '23 00:10 smoothdvd

@smoothdvd Thanx that made it for me as well (on Arch):

docker run --rm -p 3306:3306 --memory 1G --ulimit nofile=65536:65536 mysql:5.7.44

But I would call this an actual regression in MySQL (Oracle), not the fault of the Docker image.

ghost avatar Nov 28 '23 19:11 ghost

Unfortunately, MySQL 5.7 is now EOL upstream :bow: :heart:

https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-44.html

tianon avatar Dec 18 '23 23:12 tianon