Detailed steps to install Mysql5.7.19 using yum on Centos7

Detailed steps to install Mysql5.7.19 using yum on Centos7

There is no mysql by default in the yum source of Centos7, because mariaDB has been used instead of mysql.

First, we download the mysql repo source. We can go to the mysql official website to find the latest repo source address.

address:

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

Start downloading the repo source under linux

//Download mysql rpm package# wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

//Install mysql rpm package# rpm -ivh mysql57-community-release-el7-11.noarch.rpm

//Install mysql
# yum install mysql-community-server

After successful installation, you need to restart the mysql service.

# service mysqld restart

When MySQL 5.7 is first installed, a root password will be randomly generated. We need to find this random password first and then change the new password. We can find the random root password through the grep command.

[root@local bin]# grep "password" /var/log/mysqld.log
2017-09-24T08:03:30.664086Z 1 [Note] A temporary password is generated for root@localhost: 8A3xwbk8_P1A

Login to mysql using a random password

[root@local bin]# mysql -uroot -p
Enter password:

Reset the root password after logging in

mysql> SET password = PASSWORD("mysql123");
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

If the above error message appears, it means that the password is set too simply. The password setting rule is to contain numbers, uppercase and lowercase letters, and strings.

Finally, grant external network login permission, username is the user name, password is the login password

mysql>grant all privileges on *.* to username@'%' identified by 'password';

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

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 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
  • CentOS7 uses rpm to install MySQL 5.7 tutorial diagram
  • Detailed explanation of how to install mysql5.6 from binary installation package in centos7 environment

<<:  Detailed usage of Linux text search command find

>>:  Detailed explanation of using grep command in Linux

Recommend

Implementation code of Nginx anti-hotlink and optimization in Linux

Hide version number The version number is not hid...

Understand all aspects of HTTP Headers with pictures and text

What are HTTP Headers HTTP is an abbreviation of ...

Understanding and using React useEffect

Table of contents Avoid repetitive rendering loop...

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

Preface This article mainly introduces 4 methods ...

Users need to know why

When I was in the securities company, because the ...

MySQL database migration quickly exports and imports large amounts of data

Database migration is a problem we often encounte...

A brief discussion on the issue of element dragging and sorting in table

Recently, when using element table, I often encou...

Summary of MySQL's commonly used database and table sharding solutions

Table of contents 1. Database bottleneck 2. Sub-l...

CSS tips for implementing Chrome tab bar

This time let’s look at a navigation bar layout w...

Solve the problem of MySql8.0 checking transaction isolation level error

Table of contents MySql8.0 View transaction isola...

Creative About Us Web Page Design

Unique “About”-Pages A great way to distinguish yo...

Docker adds a bridge and sets the IP address range

I don't know if it's because the binary d...

Some thoughts and experience sharing on web page (website) design and production

First, before posting! Thanks again to I Want to S...

Detailed explanation of the process of building and running Docker containers

Simply pull the image, create a container and run...

Detailed explanation of how to access MySQL database remotely through Workbench

Preface Workbench is installed on one computer, a...