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

Summary of MySQL password modification methods

Methods for changing passwords before MySQL 5.7: ...

Summary of three ways to implement ranking in MySQL without using order by

Assuming business: View the salary information of...

How to implement n-grid layout in CSS

Common application scenarios The interfaces of cu...

Sequence implementation method based on MySQL

The team replaced the new frame. All new business...

Example code for drawing double arrows in CSS common styles

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

How to use JavaScript to determine several common browsers through userAgent

Preface Usually when making h5 pages, you need to...

ie filter collection

IE gave us a headache in the early stages of deve...

LINUX Checks whether the port is occupied

I have never been able to figure out whether the ...

jQuery achieves full screen scrolling effect

This article example shares the specific code of ...

Super detailed steps to install zabbix3.0 on centos7

Preface Recently, part of the company's busin...

Non-standard implementation code for MySQL UPDATE statement

Today I will introduce to you a difference betwee...

How to build a deep learning environment running Python in Docker container

Check virtualization in Task Manager, if it is en...

Vue implements div wheel zooming in and out

Implement div wheel zooming in and out in Vue pro...

Explanation of building graph database neo4j in Linux environment

Neo4j (one of the Nosql) is a high-performance gr...