CenOS6.7 mysql 8.0.22 installation and configuration method graphic tutorial

CenOS6.7 mysql 8.0.22 installation and configuration method graphic tutorial

CenOS6.7 installs MySQL8.0.22 (recommended collection)

1. Download the MySQL installation package

Official website download link: MySQL official website download, or click to download directly

Select the version that corresponds to your system to download

2. Upload the installation package to Linux

Use filezilla to upload. I am using SecureCRT to operate the Linux system. Just press Alt+P


I put the downloaded installation package on the E drive.

Upload via the following code

put e:/mysql-8.0.22-1.el6.i686.rpm-bundle.tar

After the upload is complete, it will be in the user directory under the home directory

3. Installation preparation

Before installing, check if there is mysql in linux
Use the command to view

rpm -qa | grep mysql

If there is, uninstall it. I will demonstrate it here. Uninstall it and reinstall it later.


Uninstall all found

rpm -e --nodeps Found the content


Then delete the mysql-related files if any, and skip if none.

find / -name mysqld*
rm -rf the found files

4. Start decompression and installation

Create a folder first

mkdir /usr/local/mysql

Unzip the MySQL tarball uploaded in the /home/user directory ( corresponding to your own user name ) to /usr/local/mysql

tar -xvf mysql-8.0.22-1.el6.i686.rpm-bundle.tar -C /usr/local/mysql

Start Installation

You need to go into the mysql folder where you just unzipped it.

Install mysql-community-common-8.0.22-1.el6.i686

rpm -ivh mysql-community-common-8.0.22-1.el6.i686.rpm --nodeps --force

Install mysql-community-libs-8.0.22-1.el6.i686.rpm

rpm -ivh mysql-community-libs-8.0.22-1.el6.i686.rpm --nodeps --force

Install mysql-community-client-8.0.22-1.el6.i686.rpm

rpm -ivh mysql-community-client-8.0.22-1.el6.i686.rpm --nodeps --force

Install mysql-community-server-8.0.22-1.el6.i686.rpm

rpm -ivh mysql-community-server-8.0.22-1.el6.i686.rpm --nodeps --force

After the installation is complete, check it through rpm -qa | grep mysql

You can see the four just installed

5. Modify the configuration file

After completing the above steps, the my.cnf file has been generated.

vim /etc/my.cnf

Add at the end

lower_case_table_names=1

6. Initialize and start the database

initialization

mysqld --initialize

Authorize the mysql user for the mysql installation path folder:

chown -R mysql:mysql /var/lib/mysql

View database status

service mysqld status

Start mysql

service mysqld start


There is a pitfall that we encountered before. If we can't start it, we need to authorize it. If we can start it, we also need to authorize it.

chmod -R 777 /var/lib/mysql

7. Log in to MySQL

View Temporary Password Two ways

1. Find from the log:

cat /var/log/mysqld.log


2. Filter and search from the log

cat /var/log/mysqld.log | grep password


Login to mysql

mysql -u root -p

8. Change password

Here I changed the password to 123456, please modify it yourself

ALERT user 'root'@'localhost' identified with mysql_native_password by '123456';

Log out and log in again


View the database

9. Configure remote access

Assign all permissions on all tables in all databases to the root user at all IP addresses, and the password is 123456

create user 'root'@'%' identified with mysql_native_password by '123456';

grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;

10. Set up Linux firewall

Allow port 3306 and add this setting to the firewall rules

/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
/etc/rc.d/init.d/iptables save 

Remote Connection Using Navicat

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL 8.0.24 version installation and configuration method graphic tutorial
  • MySQL 8.0.24 installation and configuration method graphic tutorial
  • MySQL 8.0.23 free installation version configuration detailed tutorial
  • MySQL 8.0.23 installation and configuration method graphic tutorial under win10
  • MySQL 8.0.22 compressed package complete installation and configuration tutorial diagram (tested and effective)
  • Detailed tutorial on installing and configuring MySql5.7 on Ubuntu 20.04
  • 10 performance configuration items that need to be adjusted after installing MySQL
  • MySQL 8.0.22 zip compressed package version (free installation) download, installation and configuration steps detailed
  • Super detailed MySQL8.0.22 installation and configuration tutorial
  • MySQL 8.0.22 winx64 installation and configuration graphic tutorial
  • MySQL 8.0.22.0 download, installation and configuration method graphic tutorial
  • MySQL 8.0.22 installation and configuration method graphic tutorial under Windows 10
  • MySQL 5.5.27 winx64 installation and configuration method graphic tutorial
  • MySQL 8.0.22 winx64 installation and configuration method graphic tutorial
  • MySQL 8.0.22 download, installation and configuration method graphic tutorial
  • MySQL 8.0.22 installation and configuration graphic tutorial
  • MySQL 8.0.22 installation and configuration method graphic tutorial
  • Detailed tutorial on installation and configuration of compressed version of MySQL database

<<:  Commonly used HTML format tags_Powernode Java Academy

>>:  Implementation of Docker CPU Limit

Recommend

Mysql stores tree structure through Adjacency List (adjacency list)

The following content introduces the process and ...

Several commonly used methods for centering CSS boxes (summary)

The first one: Using the CSS position property &l...

Box-shadow and drop-shadow to achieve irregular projection example code

When we want to add a shadow to a rectangle or ot...

JavaScript implementation of the back to top button example

This article shares the specific code for JavaScr...

Zabbix monitors Linux hosts based on snmp

Preface: The Linux host is relatively easy to han...

About Docker security Docker-TLS encrypted communication issues

Table of contents 1. Security issues with Docker ...

Detailed explanation of log processing of Docker containers

Docker has many log plug-ins. The default is to u...

Uniapp realizes sliding scoring effect

This article shares the specific code of uniapp t...

Solve the mobile terminal jump problem (CSS transition, target pseudo-class)

Preface Many friends who have just come into cont...

How does MySQL achieve multi-version concurrency?

Table of contents MySQL multi-version concurrency...

How to configure MGR single master and multiple slaves in MySQL 8.0.15

1. Introduction MySQL Group Replication (MGR for ...

MySQL 5.7.15 installation and configuration method graphic tutorial (windows)

Because I need to install MySQL, I record the ins...