Linux system MySQL8.0.19 quick installation and configuration tutorial diagram

Linux system MySQL8.0.19 quick installation and configuration tutorial diagram

1. Environment Introduction

Installing MySQL on Linux using yum requires downloading a series of MySQL components from the Internet. This process is very time-consuming and there is a possibility of download interruption. If you want to install MySQL quickly, you can first download the offline package of MySQL from the Internet and transfer it to the system for installation. This article takes CentOS7 and MySQL8.0.19 as an example to explain

A quick installation and configuration method for MySQL.

1. Operating system: CentOS7_x64
2. Database version: MySQL-8.0.19

Offline package download:

Link: https://pan.baidu.com/s/1OdehL8MoCe44nJ-SkkW8xw Extraction code: fk2d

2. Install MySQL-8.0.19

After decompressing the MySQL compressed file, you will get the following rpm file list:


insert image description here

The following rpm packages need to be installed in order:

mysql-community-common-8.0.19-1.el7.x86_64.rpm
mysql-community-libs-8.0.19-1.el7.x86_64.rpm
mysql-community-client-8.0.19-1.el7.x86_64.rpm
mysql-community-server-8.0.19-1.el7.x86_64.rpm
Installation command:
rpm -ivh rpm package name

Note: Before installing mysql-community-libs package, you need to uninstall the mariadb-libs package that comes with Linux, otherwise the installation will fail:

rpm -qa | grep mariadb-libs*
rpm -e --nodeps mariadb-libs*

After the installation is complete, start MySQL and log in to verify that the installation was successful:

systemctl start mysqld
cat /var/log/mysqld.log | grep password
mysql -uroot -p
enter password:

3. Configure MySQL

1. The initial MySQL password is complex and difficult to remember. It needs to be modified after the first login:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';

2. Develop MySQL connection permissions so that it can be accessed by remote connection tools:

UPDATE mysql.user SET `Host`='%' WHERE User='root';
flush privileges;

If you do not have the permission to open the connection, the following error will be reported when you use a client such as Navicat to connect to the database:

insert image description here

3. Restore the password verification plug-in and change the password authentication plug-in of MySQL8 from caching_sha2_password to mysql_native_password:

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'passowrd';

If the plug-in is not replaced, the following error will be reported during connection:

insert image description here

4. Open port 3306 on the firewall and set MySQL to start automatically at boot:

firewall-cmd --zone=public --add-port=3306/tcp --permanent
systemctl enable mysqld

Summarize

This is the end of this article about the illustrated tutorial on the quick installation and configuration of MySQL 8.0.19 on Linux. For more information about the installation and configuration of MySQL 8.0.19 on Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Tutorial on installing mysql5.7.36 database in Linux environment
  • Introduction to the process of installing MySQL 8.0 in Linux environment
  • Detailed steps to install MySQL 8.0.27 in Linux 7.6 binary
  • Tutorial on installing MySQL under Linux
  • MySQL multi-instance deployment and installation guide under Linux
  • MySQL 8.0.25 installation and configuration tutorial under Linux
  • mysql8.0.23 linux (centos7) installation complete and detailed tutorial
  • Detailed tutorial on installing MySQL database in Linux environment
  • Detailed tutorial on installing mysql-8.0.20 under Linux
  • Tutorial on installing mysql8 on linux centos7
  • Install MySQL database in Linux environment

<<:  Detailed graphic tutorial on installing Ubuntu 20.04 dual system on Windows 10

>>:  JavaScript CollectGarbage Function Example

Recommend

Introduction to CSS BEM Naming Standard (Recommended)

1 What is BEM Naming Standard Bem is the abbrevia...

TypeScript learning notes: type narrowing

Table of contents Preface Type Inference Truth va...

Use of MySQL query rewrite plugin

Query Rewrite Plugin As of MySQL 5.7.6, MySQL Ser...

Installation tutorial of mysql 8.0.11 compressed version under win10

This article shares the installation tutorial of ...

How to build svn server in linux

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

Javascript scope and closure details

Table of contents 1. Scope 2. Scope Chain 3. Lexi...

Introduction to deploying selenium crawler program under Linux system

Table of contents Preface 1. What is selenium? 2....

How to configure Nginx to support ipv6 under Linux system

1. Check whether the existing nginx supports ipv6...

Native js canvas to achieve a simple snake

This article shares the specific code of js canva...

Detailed explanation of how to use Node.js to implement hot reload page

Preface Not long ago, I combined browser-sync+gul...

Introduction to possible problems after installing Tomcat

1. Tomcat service is not open Enter localhost:808...

Start a local Kubernetes environment using kind and Docker

introduce Have you ever spent a whole day trying ...

Detailed tutorial on compiling and installing python3.6 on linux

1. First go to the official website https://www.p...