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

How to install jupyter in docker on centos and open ports

Table of contents Install jupyter Docker port map...

innodb_flush_method value method (example explanation)

Several typical values ​​of innodb_flush_method f...

Steps to create your own YUM repository

To put it simply, the IP of the virtual machine u...

Detailed explanation of Linux file operation knowledge points

Related system calls for file operations create i...

9 Practical Tips for Creating Web Content Pages

Content 1. Give readers a reason to stay. Make the...

How to delete the container created in Docker

How to delete the container created in Docker 1. ...

Analysis of the HTML writing style and reasons of experienced people

1. Navigation: Unordered List vs. Other Label Ele...

Timeline implementation method based on ccs3

In web projects we often use the timeline control...

Tutorial on installing mysql under centos7

Recently, I plan to deploy a cloud disk on my hom...

How to build a new image based on an existing image in Docker

Building new images from existing images is done ...

Basic usage details of Vue componentization

Table of contents 1. What is componentization? 2....

How to view and modify the time zone in MySQL

Today I found that a program inserted an incorrec...

How to draw special graphics in CSS

1. Triangle Border settings Code: width: 300px; h...