Install MySQL 5.7 on Ubuntu 18.04

Install MySQL 5.7 on Ubuntu 18.04

This article is compiled with reference to the MySQL official website, and some problems encountered are recorded by the way.

① Add the MySQL APT repository to your system’s software repository list

----> Download APT repository (download link)

---->Install the APT repository (pay attention to the correct path)

(1)

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

Here is a tutorial written under Ubuntu on Tencent Cloud. After I executed the above command in Tencent Cloud, the MySQL installation interface popped up directly.

When I installed it on my computer, after installing the APT repository, I executed the following command

(2)

sudo apt-get update

Then install MySQL

(3)

sudo apt-get install mysql-server

If you execute code (1), the following interface will pop up.

You can continue to operate directly. If the screen does not pop up, just execute (2) (3) commands normally, and the above screen will pop up. There's no big problem here.

But I don’t know why the installation screen pops up directly when I execute command (1) in Tencent Cloud. I have just started learning Linux. Or if anyone knows, please leave a message to discuss.

②Install MySQL

As shown in the picture above, I choose not to install version 8.0 because it does not match my computer development environment. Of course, you can install 8.0, it depends on your personal preference.

Press Enter to select the first one and enter the following screen

I chose version 5.7. continue.

Keep the rest as default or change them if necessary.

Hey! There is a problem. I selected ok and it was done.

Then let me continue to enter commands. Well, we'll adapt to the situation, so let's try (2) command

sudo apt-get update 

Then after the update, we continue with (3) command

sudo apt-get install mysql-server

Well, it's installed normally.

Then you will be asked to enter the password for the database root account. I remember that the password must contain uppercase and lowercase letters, special symbols and must be no less than 8 characters.

Then enter it again to confirm.

This completes the installation.

We enter the command to log in to mysql to see if the installation is successful.

mysql -u root -p

Then enter the password. If the following mysql> appears, it is successful.

There is also the complete removal of MySQL and the visualization tool workbench, but I won’t put them here. If you need them later, please contact me and I will add them.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Ubuntu 18.04 installs mysql 5.7.23
  • Ubuntu16.04 installation mysql5.7.22 graphic tutorial
  • Solve the problem of ERROR 1045 (28000): Access denied for user ''root''@''localhost'' when logging in after installing MySQL 5.7.17 on Ubuntu 16.04
  • Manually install mysql5.7.10 on Ubuntu
  • MySQL 5.7.17 installation and configuration tutorial under Linux (Ubuntu)
  • MySQL 5.7.17 installation and configuration method graphic tutorial (Ubuntu 16.04)
  • Detailed tutorial on installing and configuring MySql5.7 on Ubuntu 20.04

<<:  How to build a Vue3 desktop application

>>:  Several ways to pass data from parent components to child components in Vue

Recommend

How to use environment variables in nginx configuration file

Preface Nginx is an HTTP server designed for perf...

Javascript asynchronous programming: Do you really understand Promise?

Table of contents Preface Basic Usage grammar Err...

Steps to run ASP.NET Core in Docker container

There are too much knowledge to learn recently, a...

Create an SSL certificate that can be used in nginx and IIS

Table of contents Creating an SSL Certificate 1. ...

Several ways to shut down Hyper-V service under Windows 10

When using VMware Workstation to open a virtual m...

Detailed explanation of the Sidecar mode in Docker Compose

Table of contents What is Docker Compose Requirem...

Analysis of the principle of Mybatis mapper dynamic proxy

Preface Before we start explaining the principle ...

JS implements multiple tab switching carousel

Carousel animation can improve the appearance and...

50 lines of code to implement Webpack component usage statistics

background Recently, a leader wanted us to build ...

How to set and get the number of Mysql connections

Get the number of connections --- Get the maximum...

Simple use of Vue vee-validate plug-in

Table of contents 1. Installation 2. Import 3. De...

Solution to find all child rows for a given parent row in MySQL

Preface Note: The test database version is MySQL ...

Can't connect to local MySQL through socket '/tmp/mysql.sock' solution

Error message: ERROR 2002: Can't connect to l...

mysql 5.7.11 winx64.zip installation and configuration method graphic tutorial

Install and configure the MySql database system. ...