Linux (two) Linux download and install mysql

First, update the data source

apt-get update

Second, install MySQL

apt-get install mysql-server

You will be prompted to create a root password during installation. Choose a secure password, and make sure you remember it, because you need it later. Next, we will complete the MySQL configuration.

Configuration

Because it is a new installation, you need to run a script that comes with security. This changes some of the less secure default options, such as remote root login and user examples. On older versions of MySQL, you need to manually initialize the data directory, but Mysql 5.7 has automatically completed.

Modify the configuration mysqld.cnf profile

vi /etc/mysql/mysql.conf.d/mysqld.cnf

The need to place the red mark into this, or use the # comment this line
Here Insert Picture Descriptionso that you can get the database operating system connected to the working widow
Here Insert Picture Description

FIG effect of a successful connection

Here Insert Picture Description

Published 45 original articles · won praise 7 · views 920

Guess you like

Origin blog.csdn.net/qq_42222342/article/details/103847311