Bobcares

Rollback Guide: MySQL Crashing After Upgrade to 8.0.38

by | Jul 9, 2024

Learn how to handle MySQL Crashing After Upgrade to 8.0.38. Our MySQL Support team is here to help you with your questions and concerns.

Rollback Guide: MySQL Crashing After Upgrade to 8.0.38

Rollback Guide: MySQL Crashing After Upgrade to 8.0.38Recently, one of our customers had trouble with MySQL crashing on some servers after an upgrade to version 8.0.38.

Upon investigation, our Experts saw messages like these in the logs:

mysqld.service: Main process exited, code=killed, status=11/SEGV

According to our Team, this issue is most likely due to a bug, but it can also be caused by malfunctioning hardware. The release of MySQL 8.0.38 led to multiple reports of MySQL failing to start after automatic updates.

Steps to Fix the Issue

Rollback the Upgrade

The first step to resolving the issue where t MySQL is not starting is to downgrade MySQL.

We can accomplish this with the following command for CentOS and RHEL Servers:

yum downgrade mysql-community*Copy Code

However, there is no native option to downgrade MySQL packages via the `apt` command for Ubuntu servers. Hence, we need to downgrade some packages manually from the MySQL archive.

  1. First, create a new directory. Then, change into it:
    mkdir -v /root/mysqldown && cd /root/mysqldownCopy Code
  2. After that, download the MySQL 8.0.37 archive:
    • For Ubuntu 20.04
      wget https://downloads.mysql.com/archives/get/p/23/file/mysql-server_8.0.37-1ubuntu20.04_amd64.deb-bundle.tarCopy Code
    • For Ubuntu 22.04
      wget https://downloads.mysql.com/archives/get/p/23/file/mysql-server_8.0.37-1ubuntu22.04_amd64.deb-bundle.tarCopy Code
  3. Then, extract the archive as seen below:
    • For Ubuntu 20.04
      tar xvf mysql-server_8.0.37-1ubuntu20.04_amd64.deb-bundle.tarCopy Code
    • For Ubuntu 22.04
      tar xvf mysql-server_8.0.37-1ubuntu22.04_amd64.deb-bundle.tarCopy Code
  4. Now, it is time to remove unnecessary packages:
    • For Ubuntu 20.04:
      rm -rvf ./mysql-community-test-debug_8.0.37-1ubuntu20.04_amd64.deb ./mysql-community-test_8.0.37-1ubuntu20.04_amd64.deb ./mysql-testsuite_8.0.37-1ubuntu20.04_amd64.debCopy Code
    • For Ubuntu 22.04:
      rm -rvf ./mysql-community-test-debug_8.0.37-1ubuntu22.04_amd64.deb ./mysql-community-test_8.0.37-1ubuntu22.04_amd64.deb ./mysql-testsuite_8.0.37-1ubuntu22.04_amd64.debCopy Code
  5. Then, install the packages:
    dpkg -i *mysql*.debCopy Code
  6. At this point, confirm MySQL Service is running:
    /scripts/restartsrv_mysql –statusCopy Code
  7. Now, we need to prevent future automatic updates:
    apt-mark hold mysql-client mysql-common mysql-community-client-core mysql-community-client-plugins mysql-community-client mysql-community-server-core mysql-community-server-debug mysql-community-server mysql-server mysql-shellCopy Code

Version Locking MySQL 8.0.37

Once we have downgraded MySQL version, it is time to lock MySQL to version 8.0.37 until updates from MySQL or cPanel.

  • For CentOS and RHEL Servers
    1. First, install the Version Lock Plugin
      yum install yum-versionlockCopy Code
    2. Then, lock the MySQL Version:
      yum versionlock mysql*Copy Code
  • For AlmaLinux, Rocky Linux, and CloudLinux 8+:
    1. First, install the Version Lock Plugin:
      dnf install python3-dnf-plugin-versionlockCopy Code
    2. Then, lock the MySQL Version:
      yum versionlock mysql*Copy Code

You can see the packages currently under a version lock with this command:

yum versionlock listCopy Code

Once the RPM package issue is fixed with a newer update or the dependency issues is resolved, we can undo the version lock with this command:

yum versionlock delete PACKAGENAMECopy Code

Additionally, we can clear all version locks with this command:

yum versionlock clearCopy Code

With the above steps, we can handle the MySQL crash issue caused by the recent upgrade to version 8.0.38.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

In brief, our Support Experts demonstrated how to handle MySQL crashing after an upgrade to 8.0.38.

0 Comments

Submit a Comment

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

Speed issues driving customers away?
We’ve got your back!