Skip to content
Upgrade MySQL 5.7 to 8

Upgrade MySQL 5.7 to 8. on Ubuntu very easy step

In this article we will learn how to upgrade MySQL 5.7 to 8. on Ubuntu.  Please follow below step it is very easy.

Upgrade MySQL 5.7 to 8. on Ubuntu

Step 1. Add MySQL APT repository

We will download and add the MySQL APT repository to system’s software repository list.

Download and Add APT repository

$ wget https://repo.mysql.com//mysql-apt-config_0.8.14-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.14-1_all.deb

Once you execute the above command 1 screen will appear. Select Mysql Server and cluster (Currently selected : mysql-8.0) and Hit Enter

Now choose MySQL 8 option and press OK

Click Ok to finish the setup.

Step 2. Update APT index and install MySQL server

Now we will update the APT index and install the latest version of MySQL server using the following commands.

$ sudo apt-get update
$ sudo apt-get install mysql-server

Confirm installation:

Step 3. Manage mysql.service

You can use the following commands to manage mysql instance.

Start and stop the service using following command

$ sudo systemctl start mysql.service
$ sudo systemctl stop mysql.service