3

I am following this tutorial in order to install MySql version 8.x in my Ubuntu 16.04.

Before the second step I should have the prompt asking me which version I wish to configure with mysql 8-0 in the list. But I am getting only the version 5.7, as we can see in the picture below: enter image description here

If I go until the final step it will install the version 5.7.

How to install the version 8.x?

Note: previously I had MariaDb instaled, and then I went trough this steps in order to uninstall.

sudo apt-get remove mariadb-server

Update

In fact something that is not in the tutorial - we should accept mysql 5.7. In the next window, we will be asked to change to mysql 8.x See this video.

IgorAlves
  • 1,132

2 Answers2

2
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
dpkg -i mysql-apt-config_0.8.10-1_all.deb

apt-get update
apt-get install mysql-server

With images: https://www.percona.com/blog/2018/05/14/installing-mysql-8-on-ubuntu-16-04-lts/

slava
  • 3,887
1

Make sure you're installing version 8. You can download it here, or through the terminal by doing:

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

Navigate to where the .deb package was downloaded and run the following in your terminal:

sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb

You will get a config prompt... Just select "OK".

Since the repository has been installed, run the following to install:

sudo apt update
sudo apt install mysql-server mysql-client

The latest version of MySQL will be installed on your system. During the installation, you should be prompted to create and confirm a MySQL root password.

img_1

You can confirm whether you want to use the new password encryption feature... It is "recommended" to.

img_2

After following these steps, MySQL should have been installed in your system!


Additionally:

You can log in by running the command:

sudo mysql -u root -p

That will take you to a MySQL welcome screen such as:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.11 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
ThunderBird
  • 1,955