HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

This installation of MySQL is already upgraded to 5.7.25?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thisupgradedinstallationmysqlalready

Problem

I used sudo apt upgrade and got this:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.


So I did it and I see this for more than an hour.

Setting up mysql-server-5.7 (5.7.25-0ubuntu0.18.04.2) ...
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.25, use --force if you still need to run mysql_upgrade


Nothing happens. I have not used MySQL for a long time and don't know what should I do. Understand there must be something with force but I am new with Ubuntu and not so familiar with commands. Can you help me? I don't understand nor what the problem is...:(

UPDATE: I can use MySQL Workbench and get access in Terminal too, but still keep seeing that error

Solution

Actually here is a solution that worked for me:

https://techierg.blogspot.com/2019/06/ubuntu-1804-mysql-this-installation-of.html

Quote:

Briefly, the solution is

Edit the file /var/lib/dpkg/info/mysql-server-5.7.postinst

sudo nano /var/lib/dpkg/info/mysql-server-5.7.postinst

At line # 370, comment out the echo ALTER statement which would like

#echo "ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket';" >> "$initfile"

Restart the VM, then...

Run dpkg configure again and the problem will be solved.

sudo dpkg --configure -a

That solved it for me and saved me hours of research.

The article refers to this link here:

https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1817374/comments/8

Context

StackExchange Database Administrators Q#228362, answer score: 5

Revisions (0)

No revisions yet.