MySQL Crashes After Upgrade to latest version 8.0.38

Many servers have experienced MySQL crashes after upgrading to version 8.0.38. This documentation provides steps to roll back the upgrade, downgrade MySQL to a stable version (8.0.37), and version lock MySQL to prevent automatic upgrades until the issue with version 8.0.38 is resolved.


Steps to Resolve MySQL Crashes


1. Roll Back the Upgrade (CentOS/RHEL)


To roll back the upgrade using `yum history`, follow these steps:


  • Run the following command to list recent yum transactions and identify the transaction ID of the MySQL upgrade:

  yum history


  • Use the transaction ID to revert the MySQL upgrade:

yum history undo


2. Downgrade MySQL (CentOS/RHEL)


If you prefer to downgrade MySQL instead of rolling back, you can use the following steps:


  • Run the following command to downgrade MySQL to version 8.0.37:

yum downgrade mysql-community-*


3. Version Lock MySQL at 8.0.37 (CentOS/RHEL)


To prevent automatic upgrades of MySQL beyond version 8.0.37 or any particular version, follow these steps to version lock it:


  • Install the version lock plugin for `yum`:

yum install yum-versionlock      # CentOS 7

dnf install python3-dnf-plugin-versionlock  # AlmaLinux, Rocky Linux, CloudLinux 8+


  • Lock MySQL at version 8.0.37:

yum versionlock mysql-community-*


  • To view all version-locked packages:

yum versionlock list


  • To remove version locks after the issue is resolved:

yum versionlock delete mysql-community-*


4. Downgrade MySQL on Ubuntu Servers


For Ubuntu servers, where `apt` does not natively support downgrading MySQL packages, follow these steps:


  • Log in as the root user and create a directory for downloading and installing MySQL 8.0.37 packages:

mkdir -v /root/mysqldown && cd /root/mysqldown


  • Download the MySQL 8.0.37 package archive suitable for your Ubuntu version:

Wget   # For Ubuntu 20.04


Wget  # For Ubuntu 22.04


  • Extract the downloaded archive:

tar -xvf mysql-server_8.0.37-1ubuntu20.04_amd64.deb-bundle.tar # Replace with appropriate file name for your Ubuntu 20


tar -xvf mysql-server_8.0.37-1ubuntu22.04_amd64.deb-bundle.tar # Replace with appropriate file name for your Ubuntu 22


  • Remove unnecessary packages from the extracted directory: (Verify before proceeding.)

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.deb


  • Install the remaining MySQL 8.0.37 packages:

dpkg -i *mysql*.deb


  • Mark MySQL packages on hold to prevent them from being upgraded automatically:

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-shell


For further details and troubleshooting, refer to the following articles:


1. [How to Version Lock RPM Packages] (

2. [Upstream Issue: MySQL 8.0.38 Does Not Start (Segmentation Fault)] ( )


By following the steps outlined above, you can mitigate the issues caused by MySQL 8.0.38 and maintain a stable version until an official update is provided by MySQL. Ensure to monitor updates from MySQL for any new releases or patches addressing the current issues with version 8.0.38.


This documentation covers both CentOS/RHEL and Ubuntu methods for managing MySQL versions and preventing unwanted upgrades.

Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 186