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

How MySQL handles implicit default values

Some students said that they encountered the prob...

Detailed explanation of Angular dynamic components

Table of contents Usage scenarios How to achieve ...

What are the differences between xHTML and HTML tags?

All tags must be lowercase In XHTML, all tags must...

HTML end tag issue and w3c standard

According to the principles of W3C, each start tag...

Detailed steps for porting busybox to build a minimal root file system

Busybox: A Swiss Army knife filled with small com...

Implementation of two basic images for Docker deployment of Go

1. golang:latest base image mkdir gotest touch ma...

Use of SerialPort module in Node.js

Table of contents Purpose Module Installation Bas...

Detailed explanation of MySQL injection without knowing the column name

Preface I feel like my mind is empty lately, as I...

The meaning of the 5 types of spaces in HTML

HTML provides five space entities with different ...

Using radial gradient in CSS to achieve card effect

A few days ago, a colleague received a points mal...

Summary of Linux user groups and permissions

User Groups In Linux, every user must belong to a...

Solution to 1067 when Mysql starts in Windows

I just started working a few days ago and install...