CentOS7 uses rpm to install MySQL 5.7 tutorial diagram

CentOS7 uses rpm to install MySQL 5.7 tutorial diagram

1. Download 4 rpm packages

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

If you want to download with Thunder, you must first find the corresponding rpm download path

First, open the MySQL official website in the browser: https://dev.mysql.com/downloads/mysql/5.7.html

In the opened interface, press F12 on the keyboard to open the developer tools. After opening, it is as follows:

Find the corresponding version on the official website:

Click to download directly:

You can find the download path in the developer tools:

The following are the paths of the 4 myql5.7 rpm packages. You can download them by directly opening Xunlei and filling in the download path. The same method can be used for other versions:

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-server-5.7.26-1.el7.x86_64.rpm

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-client-5.7.26-1.el7.x86_64.rpm

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-common-5.7.26-1.el7.x86_64.rpm

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-community-libs-5.7.26-1.el7.x86_64.rpm

2. Upload rpm to linux

I use xshell here, and xftp is not installed

Enter the put command in sftp and select the downloaded rpm package to upload:

3. Installation

The uploaded rpm is as follows:

Install through rpm -ivhmysql-community-****-5.7.26-1.el7.x86_64.rpm--force --nodeps , *** represents common, libs, client, server

Installation order common-->libs-->client-->server

If there is no --force --nodeps, a warning will appear:

warning: mysql-community-common-5.7.26-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

4. Configuration

Start the mysql service:

[root@localhost ~]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[root@localhost ~]#

Find the initial password:

[root@localhost ~]# cat /var/log/mysqld.log |grep password
2019-06-02T08:39:38.448115Z 1 [Note] A temporary password is generated for root@localhost: dLZMCRv?s2q)
2019-06-02T08:40:41.870130Z 2 [Note] Access denied for user 'root'@'localhost' (using password: NO)

Log in to mysql:

[root@localhost ~]# mysql -u root -p

The password is dLZMCRv?s2q found above)

Change the root password:

mysql> alter user 'root'@'localhost' identified by 'newpasswd';

Allow remote connections:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'newpasswd' WITH GRANT OPTION;
mysql> FLUSH PEIVLEGES;

Turn off the firewall:

[root@localhost ~]# systemctl stop firewalld.service

Summarize

The above is the tutorial illustration of how to install mysql5.7 using rpm on centos7 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • How to install jdk1.8.0_151 and mysql5.6.38 in centos7.2.1511
  • How to install mysql5.6 on centos7
  • Centos7 install mysql5.6.29 shell script
  • Detailed explanation of how to install mysql5.7.16 from source code in centos7 environment
  • How to install and modify the initial password of mysql5.7.18 under Centos7.3
  • Centos7 installation and configuration of Mysql5.7
  • Tutorial on installing lnmp using yum on centos7 (linux+nginx+php7.1+mysql5.7)
  • Detailed steps to install Mysql5.7.19 using yum on Centos7
  • Detailed tutorial on installing Mysql5.7.19 on Centos7 under Linux
  • Alibaba Cloud Centos7.3 installation mysql5.7.18 rpm installation tutorial
  • Installation and configuration code of apache, php7 and mysql5.7 in CentOS7 server
  • Detailed explanation of how to install mysql5.6 from binary installation package in centos7 environment

<<:  React Synthetic Events Explained

>>:  Solution to forgetting the administrator password of mysql database

Recommend

A brief analysis of Linux network programming functions

Table of contents 1. Create a socket 2. Bind sock...

MySQL database optimization: index implementation principle and usage analysis

This article uses examples to illustrate the prin...

What is Software 404 and 404 Error and what is the difference between them

First of all, what is 404 and soft 404? 404: Simpl...

Detailed explanation of Vue filters

<body> <div id="root"> <...

Example of implementing load balancing with Nginx+SpringBoot

Introduction to Load Balancing Before introducing...

MySQL Flush-List and dirty page flushing mechanism

1. Review The Buffer Pool will be initialized aft...

Introduction to SSL certificate installation and deployment steps under Nginx

Table of contents Problem description: Installati...

How to implement Docker to dynamically pass parameters to Springboot projects

background Recently, some friends who are new to ...

Detailed explanation of Angular routing sub-routes

Table of contents 1. Sub-route syntax 2. Examples...

How to move mysql5.7.19 data storage location in Centos7

Scenario: As the amount of data increases, the di...

How to install openjdk in docker and run the jar package

Download image docker pull openjdk Creating a Dat...

How to use CSS3 to implement a queue animation similar to online live broadcast

A friend in the group asked a question before, th...