1

Just installed Ubuntu 20.04.2 and MySQL 5.7. It asks for update to 8.0, but I do not want it. How to hold package to keep getting updates for 5.7, but do not make it update to 8.0?

sudo apt-mark hold <package-name> will stop all future updates. Need to get the updates for 5.7, amnyway.

Ran sudo dpkg-reconfigure mysql-apt-config and selected only 5.7, but apt still wants to update to 8.0!?

2
6

How I made it work thanks to Kulfy...

sudo nano /etc/apt/preferences.d/mysql 

Added following code and saved.

Package: mysql-server
Pin: version 5.7*
Pin-Priority: 1001

Package: mysql-client
Pin: version 5.7*
Pin-Priority: 1001

Package: mysql-community-server
Pin: version 5.7*
Pin-Priority: 1001

Package: mysql-community-client
Pin: version 5.7*
Pin-Priority: 1001

Package: libmysqlclient-dev
Pin: version 5.7*
Pin-Priority: 1001

Now apt no longer annoys me with mysql 8.0 updates... Great!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.