Detailed tutorial on how to install mysql8.0 using Linux yum command

Detailed tutorial on how to install mysql8.0 using Linux yum command

1. Do a good job of cleaning before installation

rpm -pa | grep mysql or rpm -qa | grep -i mysql
yum remove mysql-xxx-xxx
find / -name mysql
rm -rf /xxx/xxx/xxx

2. Download the corresponding installation package

Download link: https://dev.mysql.com/downloads/repo/yum/

3. Install MySQL

Execute rpm file

rpm -ivh mysql57-community-release-el7-11.noarch.rpm

Install mysql

yum install mysql-community-server

Start mysql service

Serve mysql start

Get the initialization password

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

Enter the database to change the password

mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

Enable remote access

use mysql;
update user set host='%' where user='root';

Open port 3306

vim /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
service iptables restart

Summarize

The above is a detailed tutorial on how to install mysql8.0 using the Linux yum command. 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:
  • mysql8.0 forgotten password modification and net command service name invalid problem
  • Detailed explanation of common commands in MySQL 8.0+
  • Detailed explanation of MySQL 8.0.18 commands

<<:  Detailed explanation of mysql basic operation statement commands

>>:  Detailed steps for creating a Vue scaffolding project

Recommend

What is ssh port forwarding? What's the use?

Table of contents Preface 1. Local port forwardin...

Things to note when writing self-closing XHTML tags

The img tag in XHTML is so-called self-closing, w...

Detailed explanation of JavaScript prototype and examples

Table of contents The relationship between the co...

Teach you how to quickly enable self-monitoring of Apache SkyWalking

1. Enable Prometheus telemetry data By default, t...

JavaScript selector functions querySelector and querySelectorAll

Table of contents 1. querySelector queries a sing...

vue+tp5 realizes simple login function

This article example shares the specific code of ...

Bootstrap 3.0 study notes grid system principle

Through the brief introduction in the previous tw...

Put frameset in body through iframe

Because frameset and body are on the same level, y...

How to encapsulate timer components in Vue3

background When you open the product details on s...

Introduction to reactive function toRef function ref function in Vue3

Table of contents Reactive Function usage: toRef ...

Difference and principle analysis of Nginx forward and reverse proxy

1. The difference between forward proxy and rever...