2

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

1 Answer 1

8

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!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .