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

React internationalization react-i18next detailed explanation

Introduction react-i18next is a powerful internat...

Implementation of MySQL master-slave status check

1. Check the synchronization status of A and B da...

N ways to center elements with CSS

Table of contents Preface Centering inline elemen...

How to underline the a tag and change the color before and after clicking

Copy code The code is as follows: a:link { font-s...

How to extract string elements from non-fixed positions in MySQL

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

Div adaptive height automatically fills the remaining height

Scenario 1: Html: <div class="outer"...

MySQL foreign key setting method example

1. Foreign key setting method 1. In MySQL, in ord...

The difference and usage of Ctrl+z, Ctrl+c and Ctrl+d in Linux commands

What does Ctrl+c, Ctrl+d, Ctrl+z mean in Linux? C...

Using Docker Enterprise Edition to build your own private registry server

Docker is really cool, especially because it'...

How MySQL Select Statement is Executed

How is the MySQL Select statement executed? I rec...

HTML Code Writing Guide

Common Convention Tags Self-closing tags, no need...

100-1% of the content on the website is navigation

Website, (100-1)% of the content is navigation 1....