Detailed tutorial on installing mysql-8.0.20 under Linux

Detailed tutorial on installing mysql-8.0.20 under Linux

**

Install mysql-8.0.20 under Linux

**

Environment Introduction

Operating system: CentOS 7
mysql download address: https://dev.mysql.com/downloads/mysql/
Download version: https://www.jb51.net/softs/609101.html

https://www.jb51.net/softs/609101.html

Uninstall mysql

Check whether mysql has been installed, command: find / -name mysql

Insert piece description here

If installed, uninstall:

Delete the relevant directories:

insert image description here

Delete the configuration file:

insert image description here

Delete the mysql user and user group (if there is a process, kill it and then delete it)

insert image description here

Uninstall complete!

Install mysql

Put the mysql-8.0.20-linux-glibc2.12-x86_64.tar.xz package in the /usr/local/env/mysql directory and unzip it. If there is no mysql directory, create a new one.

insert image description here

Rename after decompression

insert image description here
insert image description here

Add user group: mysql, user: mysql, and add it to the mysql user group

insert image description here

The useradd -r parameter indicates that the mysql user is a system user and cannot be used to log in to the system.
The useradd -g parameter means adding the mysql user to the mysql user group.

Check libaio

insert image description here

If not installed, install it with the following command:
yum search libaio

Configure my.cnf file

insert image description here

Copy the following information into the my.cnf file

insert image description here

Create a data folder

insert image description here

Change the user and group of the mysql directory to mysql

insert image description here

Initialize mysqld and generate an initialization password

insert image description here

Set startup

Copy the mysql.server script to the resource directory and grant execution permissions:

insert image description here

Add the mysqld service to the system service and check whether it is effective:

insert image description here

The above information is effective!
Start mysqld:

insert image description here

Configuring environment variables

Open the /etc/profile configuration file and add the following content:
#mysql environment variables
PATH=$PATH:/usr/local/env/mysql/mysql/bin
export PATH

If you have JDK, modify it as follows:

insert image description here

Execute the command to make it effective:

insert image description here

Check whether the configuration is successful. The following shows that the configuration is successful.

insert image description here

Because skip-grant-tables is added to my.cnf, it is a password-free login

insert image description here

If you have a password to log in, add # before skip-grant-tables in my.cnf

To change your login password:

insert image description here
insert image description here

If an error occurs during the execution of the above command, use flush privileges; and then execute the above command again.
Stop the service and log in with a password:

insert image description here

Restart the service:

insert image description here

This is an unsuccessful connection using navicat:

insert image description here

Enable remote login:

insert image description here
insert image description here

Use navicat to connect again:

insert image description here

Connection successful!

Summarize

This is the end of this article about the detailed tutorial on installing mysql-8.0.20 under Linux. For more relevant content about installing mysql8.0.20 in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone 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
  • Linux system MySQL8.0.19 quick installation and configuration tutorial diagram
  • Tutorial on installing mysql8 on linux centos7
  • Install MySQL database in Linux environment

<<:  Alibaba Cloud Server Domain Name Resolution Steps (Tutorial for Beginners)

>>:  Integration practice of Vue+Element background management framework

Recommend

Detailed explanation of the correct use of the count function in MySQL

1. Description In MySQL, when we need to get the ...

CSS3 realizes various graphic effects of small arrows

It’s great to use CSS to realize various graphics...

MySQL InnoDB transaction lock source code analysis

Table of contents 1. Lock and Latch 2. Repeatable...

Methods of adaptive web design (good access experience on mobile phones)

1. Add the viewport tag to the HTML header. At th...

CSS position fixed left and right double positioning implementation code

CSS Position The position attribute specifies the...

In-depth understanding of the use of CSS clear:both

clear:both is used to清除浮動This is the impression I...

Flame animation implemented with CSS3

Achieve results Implementation Code html <div ...

Vue Element front-end application development: Use of API Store View in Vuex

Table of contents Overview 1. Separation of front...

9 Tips for Web Page Layout

<br />Related articles: 9 practical suggesti...

Example code for drawing double arrows in CSS common styles

1. Multiple calls to single arrow Once a single a...

Record the whole process of MySQL master-slave configuration based on Linux

mysql master-slave configuration 1. Preparation H...

Vue integrates Tencent Map to implement API (with DEMO)

Table of contents Writing Background Project Desc...

React Native environment installation process

react-native installation process 1.npx react-nat...