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

Nginx rush purchase current limiting configuration implementation analysis

Due to business needs, there are often rush purch...

How to solve the margin collapse problem in CSS

First, let's look at three situations where m...

About Zabbix custom monitoring items and triggers

Table of contents 1. Monitoring port Relationship...

echars 3D map solution for custom colors of regions

Table of contents question extend Solving the pro...

Analysis of the advantages and disadvantages of MySQL stored procedures

MySQL version 5.0 began to support stored procedu...

Sample code for making a drop-down menu using pure CSS

Introduction: When I looked at interview question...

The correct way to use Homebrew in Linux

Many people use Linux Homebrew. Here are three ti...

How to build svn server in linux

1: Install SVN yum install -y subversion 2. Creat...

Summary of basic SQL statements in MySQL database

This article uses examples to describe the basic ...

Design theory: On the issues of scheme, resources and communication

<br />This problem does not exist in many sm...

Basic use of subqueries in MySQL

Table of contents 1. Subquery definition 2. Subqu...

Example of how to set up a third-level domain name in nginx

Problem Description By configuring nginx, you can...