简体   繁体   中英

Installing MySQL Client 5.6 on Ubuntu 18.04

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM