Ubuntu Server MySQL 5.7 Update Failure Fix

Today I noticed that MySQL failed to update on one of my droplets, after trying for a while I was unable to get it to successfully update. I tried many different posted solutions but the only way I was able to fix the issue was to backup my databases/users, purge, manually delete files, install MySQL and then restore my backup.  Since this appears to be a common issue I would like to post the steps that I took.

Possible Related Bugs:

https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1573279
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1571865

The Solution (For Me At-least):

1. First you want to backup your databases/tables/users with the following command, you will need your MySQL root password.

2. Next you need to remove the current version of mysql server and do some cleaning up.

3. Remove any files leftover, you can make a backup if you need to.

4. Install latest MySQL server.

5. Restore your databases/tables/users.

6. Restart service for MySQL server

 

After doing all of this I was back in business with everything being up-to-date. If you were able to fix it another way then please post because I would love to find out if there was an easier way to avoid all of this.

Leave a Reply

Your email address will not be published. Required fields are marked *