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

Introduction to MySQL role functions

Table of contents Preface: 1. Introduction to rol...

Example analysis of mysql variable usage [system variables, user variables]

This article uses examples to illustrate the usag...

A Brief Analysis of MySQL PHP Syntax

Let's first look at the basic syntax of the c...

Realize breadcrumb function based on vue-router's matched

This article mainly introduces the breadcrumb fun...

Solve the problem of MySql client exiting in seconds (my.ini not found)

Problem description (environment: windows7, MySql...

Server stress testing concepts and methods (TPS/concurrency)

Table of contents 1 Indicators in stress testing ...

A brief discussion on the solution to excessive data in ElementUI el-select

Table of contents 1. Scenario Description 2. Solu...

Solutions to black screen when installing Ubuntu (3 types)

My computer graphics card is Nvidia graphics card...

Examples of 4 methods for inserting large amounts of data in MySQL

Preface This article mainly introduces 4 methods ...

Simple principles for web page layout design

This article summarizes some simple principles of...

Javascript Virtual DOM Detailed Explanation

Table of contents What is virtual dom? Why do we ...

VMWare15 installs Mac OS system (graphic tutorial)

Installation Environment WIN10 VMware Workstation...

Analysis of the Principles of MySQL Slow Query Related Parameters

MySQL slow query, whose full name is slow query l...

JavaScript Basics: Error Capture Mechanism

Table of contents Preface Error Object throw try…...