apt: mysql-client and mysql-server not upgraded

bv flag

since mysql-client and mysql-server got the update to 8.0.33 they are kept back and not upgraded.

The following packages have been kept back:
 mysql-client mysql-server
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Installing mysql-client-8.0 und mysql-server-8.0 doesnt work:

apt install mysql-server-8.0 mysql-client-8.0
The following packages have unmet dependencies:
 mysql-client-8.0 : Depends: mysql-common (>= 5.5)
 mysql-server-8.0 : PreDepends: mysql-common (>= 5.5)
                    Depends: mysql-common (>= 5.8+1.0.4~)
E: Unable to correct problems, you have held broken packages.

Und mysql-common has version 8.0.32:

apt-cache policy mysql-common
  Installed: 8.0.32-1ubuntu18.04
  Candidate: 8.0.32-1ubuntu18.04
  Version table:
 *** 8.0.32-1ubuntu18.04 100
        100 /var/lib/dpkg/status
     5.8+1.0.5ubuntu2 500
        500 focal/main amd64 Packages

Any solution without completely deleting and reinstalling everything?


** update1

I'm running 20.04.6 LTS. I've updated it about half a year ago from 18.04 to 20.04.

lsb_release -d
Description:    Ubuntu 20.04.6 LTS

And my apt sources are all from archives except the php packages (ondrej).

in flag
Welcome to AskUbuntu. I’m seeing two versions of Ubuntu in the output: 18.04 and 20.04. Could you [edit] your question to include the actual version of Ubuntu that you’re running as well as whether these are stock versions of MySQL that you have installed or whether they’re from a third-party repository? This will make it easier to offer the correct solution
jp flag

The packages mysql-client & mysql-server have unmet dependencies and/or is broken.

In order to fix this,

Follow the steps( Requires reinstall of mysql-client and mysql-server and this is what I did to fix this issue in my system)

First fix the unmet dependency problem by using aptitude(package manager)

sudo apt install aptitude

sudo aptitude install mysql-server

sudo aptitude install mysql-client

Accept the confirmation on the last two steps to remove these conflicting packages.

Now both mysql-client andmysql-server will be removed. Perform an update.

sudo apt update && sudo apt upgrade

Install mysql-client:

sudo apt install mysql-client-core-8.0 

Install mysql-server:

sudo apt install mysql-server

Run sudo systemctl start mysql.service.

If it says Failed to start mysql.service: Unit mysql.service is masked.

mysql.service needs to be unmasked using sudo systemctl unmask mysql.service

Now run sudo systemctl start mysql.service again.

Check the status of mysql.service using sudo systemctl status mysql.service

It should display Active: active (running)

This should fix it. Hope it helps!

provil avatar
bv flag
that worked out. Thanks a lot!
Arjun K Shibu avatar
jp flag
@provil I'm glad to hear that your issue was resolved successfully! In order to help others who may have a similar problem, please consider marking the solution as accepted. This way, others can benefit from your experience and find a solution more easily. Thank you for sharing your experience with the community!
provil avatar
bv flag
I hope now it's correctly flagged :-) Thanks again.
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.