Tutorial diagram of installing mysql8.0.18 under linux (Centos7)

Tutorial diagram of installing mysql8.0.18 under linux (Centos7)

1 Get the installation resource package mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar

Link: https://pan.baidu.com/s/1hJRNvEdOpoVf4_zNtjRaIA

Extraction code: rsif

2 Create a new directory mysql8 in the /usr/local directory

cd /usr/local
mkdir mysql

3 Upload the downloaded resource package (mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar) to the usr/local/mysql8 directory and decompress it.

tar -xvf mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar 

insert image description here

4 rpm -qa | grep mariadb command to view the installation package of mariadb 5 rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64 --nodeps uninstall mariadb

rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64 --nodeps

6 Install in sequence

mysql-community-common-8.0.15-1.el7.x86_64.rpm,
mysql-community-libs-8.0.18-1.el7.x86_64.rpm
mysql-community-client-8.0.18-1.el7.x86_64.rpm
mysql-community-server-8.0.18-1.el7.x86_64.rpm

rpm -ivh mysql-community-common-8.0.15-1.el7.x86_64.rpm 
 rpm -ivh mysql-community-libs-8.0.18-1.el7.x86_64.rpm
 rpm -ivh mysql-community-client-8.0.18-1.el7.x86_64.rpm
 rpm -ivh mysql-community-server-8.0.18-1.el7.x86_64.rpm

7 View installed resources

rpm -qa | grep mysql 

insert image description here

8 Initialization

mysqld --initialize Initialize chown mysql:mysql /var/lib/mysql -R Authorize systemctl start mysqld Start mysql service systemctl status mysqld View mysql status cat /var/log/mysqld.log | grep password View root initial password 

insert image description here

10 Log in to mysql as root user and change the root user password

mysql -u root -p #After pressing Enter, enter the initial password, which is Iv7fjuP,ucH+ (fill in your own password)

ALTER USER "root"@"localhost" IDENTIFIED BY "your own password";
FLUSH PRIVILEGES; #Effective immediately 

insert image description here

Log in again as root and enter the password you just changed.

11 Remote Connection

use mysql;
update user set host = '%' where user = 'root'; 
ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #Change the encryption method ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'your own password'; #Update the user password (here I am root) 

insert image description here

Connection successful

References

https://www.jb51.net/article/166632.htm

https://www.jb51.net/article/141578.htm

Summarize

The above is the tutorial illustration of installing mysql8.0.18 under linux (Centos7) introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • How to install MySQL 8.0.13 in Alibaba Cloud CentOS 7
  • Detailed tutorial on installing MySQL 8.0.20 database on CentOS 7
  • Tutorial on installing mysql8 on linux centos7
  • CentOS7.5 installation of MySQL8.0.19 tutorial detailed instructions
  • Detailed steps to install MYSQL8.0 on CentOS7.6
  • CentOS7 enables MySQL8 master-slave backup and daily scheduled full backup (recommended)
  • Detailed tutorial on installing MySQL 8.0 from source code on CentOS 7.4
  • Installation tutorial of mysql8.0rpm on centos7
  • Centos7 installation of MySQL8 tutorial

<<:  WeChat applet realizes the function of uploading pictures

>>:  Sample code for installing Jenkins using Docker

Recommend

MySQL Basic Tutorial: Detailed Explanation of DML Statements

Table of contents DML statements 1. Insert record...

Markup language - for

Click here to return to the 123WORDPRESS.COM HTML ...

How to configure two-way certificate verification on nginx proxy server

Generate a certificate chain Use the script to ge...

Detailed explanation of the difference between run/cmd/entrypoint in docker

In Dockerfile, run, cmd, and entrypoint can all b...

Vue implements infinite loading waterfall flow

This article example shares the specific code of ...

Native JS realizes the special effect of spreading love by mouse sliding

This article shares with you a js special effect ...

Alpine Docker image font problem solving operations

1. Run fonts, open the font folder, and find the ...

CSS to achieve the effect of rotating flip card animation

The css animation of the rotating flip effect, th...

Native js implementation of slider interval component

This article example shares the specific code of ...

MySQL 8.0.12 installation graphic tutorial

MySQL8.0.12 installation tutorial, share with eve...

Basic commands for MySQL database operations

1. Create a database: create data data _name; Two...

Detailed explanation of how to reduce memory usage in MySql

Preface By default, MySQL will initialize a large...

How to package the uniapp project as a desktop application

Installing Electron cnpm install electron -g Inst...