Install MySQL 8.0.11 on the Ubuntu 18.04 / 16.04 Command line

Source: Internet
Author: User
Keywords mysql 8.0.11 ubuntu 18.04 mysql server
This article describes how to install MySQL 8.0.11 on the command line of Ubuntu 18.04, Ubuntu 16.04 Server. If you want to install 8.0.14, you can also use the method mentioned in this article.

How to install MySQL 8.0.11 using commands
Please read the official MySQL 8.1.0 release, which is 2 times faster than MySQL 5.7.

1. Before downloading MySQL v8.0 to Ubuntu 18.04 or Ubuntu 16.04 Server, you need to add the official MySQL Dev apt repository, please run the following command:

$ sudo apt-get install wget

$ wget https://repo.mysql.com//mysql-apt-config_0.8.10-1_all.deb

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

Selecting previously unselected package mysql-apt-config.

(Reading database ... 127849 files and directories currently installed.)

Preparing to unpack mysql-apt-config_0.8.10-1_all.deb ...

Unpacking mysql-apt-config (0.8.10-1) ...

Setting up mysql-apt-config (0.8.10-1) ...

Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)

OK

img

2. Select <OK> and press <Enter> to confirm the version installation.

3. Once the repo is added, update the apt index and install mysql-server:

$ sudo apt-get update

$ sudo apt-get install mysql-server

4. When asked for the root password, please provide the password and confirm its settings:

img

img

img

img

img

5. Confirm the installed MySQL server version and run the following command:


root @ node-01: ~ # apt policy mysql-server

The following information is returned:

mysql-server:

Installed: 8.0.11-1ubuntu18.04

Candidate: 8.0.11-1ubuntu18.04

Version table:

*** 8.0.11-1ubuntu18.04 500

500 http://repo.mysql.com/apt/ubuntu bionic / mysql-8.0 amd64 Packages

100 / var / lib / dpkg / status

5.7.22-0ubuntu18.04.1 500

500 http://mirrors.digitalocean.com/ubuntu bionic-updates / main amd64 Packages

500 http://security.ubuntu.com/ubuntu bionic-security / main amd64 Packages

5.7.21-1ubuntu1 500

500 http://mirrors.digitalocean.com/ubuntu bionic / main amd64 Packages

From the information in the output, the version you installed is 8.0.11, and it has been successful.

6. If you stop using it, you can start the application:

$ sudo systemctl start mysql

7. Check status:

# systemctl status mysql

img

8. Run the mysql -u root -p command to test whether the MySQL 8.0.11 database is normal.

img

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.