2

Today I tried to update ubuntu from 18.04 LTS to 20.04 LTS. with do-release-uprade

After upgrade completed, I tried to start mysql with service mysql start

The result is

Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

And then I tried to check with systemctl status mysql.service

The result is

mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-04-09 17:45:14 +07; 1min 52s ago
Process: 13824 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)

Apr 09 17:45:14 systemd[1]: Failed to start MySQL Community Server. Apr 09 17:45:14 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5. Apr 09 17:45:14 systemd[1]: Stopped MySQL Community Server. Apr 09 17:45:14 systemd[1]: mysql.service: Start request repeated too quickly. Apr 09 17:45:14 systemd[1]: mysql.service: Failed with result 'exit-code'. Apr 09 17:45:14 systemd[1]: Failed to start MySQL Community Server.

I cannot access to mysql anymore because service cannot start.

I do not want to lost any database. I do not have any backup, too.

Is backup /var/lib/mysql is enough? (Anything else that I should backup?)

I am very confuse. What should I do next?

  1. Downgrade to Ubuntu 18.04 Or
  2. Find the way to reinstall mysql 5.7 for Ubuntu 20.04 Or
  3. Try upgrade mysql to 8. (but I cannot start mysql service this time)

Why ubuntu 20.04 cannot support mysql 5.7.33?

Thanks for any help.

1 Answers1

0

After some research, I make dicision to use mysql 8 that more compatible with ubuntu 20.04.

My step is

  1. Uninstall everything that relate to mysql (except /var/lib/mysql/)

apt-get remove --purge mysql-server mysql-client mysql-common

apt-get autoremove

apt-get autoclean

  1. Install Mysql 8 (Because I downgrade from 8 to 5.7 before that why I need to install again) https://www.fosstechnix.com/install-mysql-8-on-ubuntu/

wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb

dpkg -i mysql-apt-config_0.8.15-1_all.deb

apt-get update

apt-get install mysql-server

After that I choose Use Legecy Authentication Method (Retain Mysql 5.x) And can start mysql normally again. I need to recheck everything form many project that will work well with mysql 8 or not.

I do not have any backup because this is just DB Local Test Server.

Thank you every one for help me.