Detailed instructions for installing mysql5.7 database under centos7.2

Detailed instructions for installing mysql5.7 database under centos7.2

The mysql on the server is installed with version 8.0.12, and the local one is version 5.7. Today I deleted the 5.7 version and reinstalled it. Below are all the commands to follow and it will be installed.

Configuration Source

wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
yum localinstall mysql57-community-release-el7-8.noarch.rpm
# yum repolist enabled | grep "mysql.*-community.*"

Install:

yum install mysql-community-server

Start mysql

systemctl start mysqld

Automatic startup

systemctl enable mysqld
systemctl daemon-reload

Get the initial password

grep 'temporary password' /var/log/mysqld.log
UjmO#ZA9nt,Y

Change the root password (need to log in to mysql)

mysql -u root -p
set global validate_password_policy=0;
set global validate_password_length=1;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'admin';

Authorize other accounts to log in remotely

CREATE USER 'admin'@'%' IDENTIFIED BY 'admin';
GRANT ALL ON *.* TO 'admin'@'%';
flush privileges

Summarize

The above is the detailed command for installing mysql5.7 database under centos7.2 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:
  • Detailed tutorial on compiling and installing MySQL 5.7.24 on CentOS7
  • How to install MySQL via SSH on a CentOS VPS
  • MySQL 8.0.13 installation and configuration tutorial under CentOS7.3
  • How to install mysql via yum on centos7
  • The easiest way to install MySQL 5.7.20 using yum in CentOS 7
  • Detailed tutorial on installing mysql 8.0.13 (rpm) on Centos7
  • Detailed tutorial on installing MySQL 8.0 from source code on CentOS 7.4
  • Installation tutorial of mysql8.0rpm on centos7
  • How to install MySQL 5.7 from source code in CentOS 7 environment
  • Tutorial on installing lnmp using yum on centos7 (linux+nginx+php7.1+mysql5.7)
  • A concise tutorial on how to install mysql5.7 decompressed version on CentOS7
  • Centos7 installation and configuration of Mysql5.7

<<:  How to import Excel files into MySQL database

>>:  Implementation of Vue3 style CSS variable injection

Recommend

Detailed explanation on how to deploy H5 games to nginx server

On the road to self-learning game development, th...

React native ScrollView pull down refresh effect

This article shares the specific code of the pull...

Detailed explanation of the interaction between React Native and IOS

Table of contents Prerequisites RN passes value t...

Where is the project location deployed by IntelliJ IDEA using Tomcat?

After IntelliJ IDEA deploys a Javaweb project usi...

The order of event execution in the node event loop

Table of contents Event Loop Browser environment ...

Detailed explanation of how to view the current number of MySQL connections

1. View the detailed information of all current c...

A brief discussion on the differences between FTP, FTPS and SFTP

Table of contents Introduction to FTP, FTPS and S...

jQuery realizes the scrolling effect of table row data

This article example shares the specific code of ...

Install multiple versions of PHP for Nginx on Linux

When we install and configure the server LNPM env...

Steps to install superset under win10 system

Superset is a lightweight self-service BI framewo...

Change the MySQL database engine to InnoDB

PS: I use PHPStudy2016 here 1. Stop MySQL during ...

nuxt.js multiple environment variable configuration

Table of contents 1. Introduction 2. Scenario 3. ...