Detailed tutorial on installing mysql 8.0.13 (rpm) on Centos7

Detailed tutorial on installing mysql 8.0.13 (rpm) on Centos7

yum or rpm?

The yum installation method is very convenient, but when downloading MySQL from the official website, the speed is slow.

The rpm installation method can download the MySQL rpm package from a domestic mirror, which is faster. rpm is also suitable for offline installation.

Environmental Description

• Operating system: Centos7.4 (CentOS-7-x86_64-Minimal-1804.iso)
•mysql:mysql8.0.13

• Uninstall the mariadb-lib that comes with the system

• Check mariadb version

rpm -qa|grep mariadb
 mariadb-libs-5.5.56-2.el7.x86_64

• Uninstall mariadb

rpm -e mariadb-libs-5.5.56-2.el7.x86_64 --nodeps

Install the dependent environment

yum install -y openssl-devel.x86_64 openssl.x86_64 
yum install -y libaio.x86_64 libaio-devel.x86_64 
yum install -y perl.x86_64 perl-devel.x86_64 
yum install -y perl-JSON.noarch 
yum install -y autoconf 
yum install -y wget
yum install -y net-tools

Turn off firewall

systemctl stop firewalld.service
systemctl disable firewalld.service

Disable selinux

vi /etc/selinux/config

Change SELINUX=enforcing to SELINUX=disabled

reboot Restart the machine

Download the MySQL installation package set from the NetEase mirror

• Download the complete installation package and unzip it

wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-8.0.13-1.el7.x86_64.rpm-bundle.tar
tar -xvf mysql-8.0.13-1.el7.x86_64.rpm-bundle.tar

• Download the necessary installation package (choose one)

wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-common-8.0.13-1.el7.x86_64.rpm
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-libs-8.0.13-1.el7.x86_64.rpm
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-client-8.0.13-1.el7.x86_64.rpm
wget https://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-community-server-8.0.13-1.el7.x86_64.rpm

Install in order

•Required installation (note the order)
• Install common
• Installing lib depends on common, make sure mariadb has been uninstalled
• Depends on libs
• Depends on client and common

rpm -ivh mysql-community-common-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-8.0.13-1.el7.x86_64.rpm

•Optional installation (note the order)

rpm -ivh mysql-community-libs-compat-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-embedded-compat-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-8.0.13-1.el7.x86_64.rpm
rpm -ivh mysql-community-test-8.0.13-1.el7.x86_64.rpm

Initialize the database

mysqld --initialize --console

Directory authorization, otherwise startup fails

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

Start the service

systemctl start mysqld

encryption

mysql_secure_installation

other

The other operations are the same as the yum installation method and will not be repeated here.

Install all perl modules

yum install -y perl-Module-Install.noarch

Summarize

The above is a detailed tutorial on how to install MySQL 8.0.13 (rpm) on CentOS7. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Detailed steps to install MYSQL8.0 on CentOS7.6
  • Tutorial on installing MySQL 5.7.28 on CentOS 6.2 (mysql notes)
  • MySQL 8.0.16 installation and configuration tutorial under CentOS7
  • CentOS7 uses yum to install mysql 8.0.12
  • Detailed steps for installing and configuring MySQL 8.0 on CentOS
  • CentOS7 installation GUI interface and remote connection implementation
  • Tutorial on installing MySql5.7 in CentOS7.2 and enabling remote connection authorization
  • Reasons and solutions for being unable to remotely connect to MySQL database under CentOS7
  • How to install MySql in CentOS 8 and allow remote connections

<<:  How to reset the password if the Ubuntu 18.04 server password is forgotten or tampered with

>>:  Implementation of element multiple form validation

Recommend

Detailed explanation of JavaScript onblur and onfocus events

In HTML pages, visual elements such as buttons an...

Understand the implementation of Nginx location matching in one article

Since the team is separating the front-end and ba...

How to add a column to a large MySQL table

The question is referenced from: https://www.zhih...

Detailed explanation of how to use the Vue date time picker component

This article example shares the specific code of ...

Native js to realize a simple snake game

This article shares the specific code of js to im...

Interviewer asked how to achieve a fixed aspect ratio in CSS

You may not have had any relevant needs for this ...

Simple implementation of html hiding scroll bar

1. HTML tags with attributes XML/HTML CodeCopy co...

CentOS 7 set grub password and single user login example code

There are significant differences between centos7...

HTML+CSS+JS sample code to imitate the brightness adjustment effect of win10

HTML+CSS+JS imitates win10 brightness adjustment ...

How to connect Navicat to the docker database on the server

Start the mysql container in docekr Use command: ...

Optimization analysis of Limit query in MySQL optimization techniques

Preface In actual business, paging is a common bu...

Database query optimization: subquery optimization

1. Case Take all employees who are not the head o...