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
Recently, 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*
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.
- First, create a new directory. Then, change into it:
mkdir -v /root/mysqldown && cd /root/mysqldown
- 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.tar
- For Ubuntu 22.04
wget https://downloads.mysql.com/archives/get/p/23/file/mysql-server_8.0.37-1ubuntu22.04_amd64.deb-bundle.tar
- For Ubuntu 20.04
- Then, extract the archive as seen below:
- For Ubuntu 20.04
tar xvf mysql-server_8.0.37-1ubuntu20.04_amd64.deb-bundle.tar
- For Ubuntu 22.04
tar xvf mysql-server_8.0.37-1ubuntu22.04_amd64.deb-bundle.tar
- For Ubuntu 20.04
- 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.deb
- 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.deb
- For Ubuntu 20.04:
- Then, install the packages:
dpkg -i *mysql*.deb
- At this point, confirm MySQL Service is running:
/scripts/restartsrv_mysql –status
- 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-shell
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
- First, install the Version Lock Plugin
yum install yum-versionlock
- Then, lock the MySQL Version:
yum versionlock mysql*
- First, install the Version Lock Plugin
- For AlmaLinux, Rocky Linux, and CloudLinux 8+:
- First, install the Version Lock Plugin:
dnf install python3-dnf-plugin-versionlock
- Then, lock the MySQL Version:
yum versionlock mysql*
- First, install the Version Lock Plugin:
You can see the packages currently under a version lock with this command:
yum versionlock list
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 PACKAGENAME
Additionally, we can clear all version locks with this command:
yum versionlock clear
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