1

I have a legacy project that I'm trying to modernize, and part of that involves setting up a more efficient system of automated backups using mysqldump.

The app's database is using MySQL 5.6, and is hosted via an RDS instance. To get mysqldump up and running, I believe I need to install a version of mysql-client that corresponds to 5.6.

However, running apt-get install mysql-client installs 8.0 by default. However, I can't find any version-specific versions of mysql-client available. Running sudo apt-get install mysql-client-5.7 returns a notice that there's no installation candidate available.

Is it still possible to install older versions of mysql-client? If not, is there another way to get ahold of the mysqldump functionality?

Edit: As @exussum noted below, 8.0 is backwards compatible with 5.6 and 5.7. I was hitting errors when running mysqldump, which I'd assumed indicated incompatibility, but were actually related to my app specifically.

Cameron Scott
  • 1,276
  • 2
  • 17
  • 37
  • According to [Ubuntu Package Search](https://packages.ubuntu.com/search?keywords=mysql-client&searchon=names&suite=all&section=all), 18.04 has 5.7. You shouldn't be getting 8.0 as the default version and "`no installation candidate`" error for MySQL Client 5.7. Do you have security repository enabled? What is the output of `apt-cache policy mysql-client` and `grep -R "security" /etc/apt/sources.list*`? Moreover, software installation questions specific to Ubuntu are better suitable for [ubuntu.se]. – Kulfy Oct 27 '20 at 14:33

1 Answers1

0

They are backwards compatible, so you can use mysql-client 8 to dump mysql-server 5.5

to get a specific version docker is great

(sudo apt install docker) to install

docker run mysql:5.6 mysqldump

will run mysqldump though docker, and you can choose your version there easily enough

exussum
  • 18,275
  • 8
  • 32
  • 65