CentOS 7.6 installation of MySQL 5.7 GA version tutorial diagram

CentOS 7.6 installation of MySQL 5.7 GA version tutorial diagram

Environment Preparation

Uninstall mariadb

rpm -qa | grep mariadb
rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64

CentOS 7.6 has mariadb integrated inside, and installing mysql will conflict with mariadb files, so you need to uninstall mariadb first.

Install MySQL

Get the yum source (MySQL official website)

Install yum source

rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

Check the startup status of each version

yum repolist all | grep mysql

The latest version 8.0 is enabled by default

Disable 8.0 and enable 5.7

yum-config-manager --disable mysql80-community
yum-config-manager --enable mysql57-community

The command is in the yum-utils package. Installing it can solve the problem of not being able to find the yum-config-manager command:

yum -y install yum-utils

Install mysqll

yum -y install mysql-community-server

Configure MySQL remote connection

Check the MySQL version

mysql -V

Start mysql && set it to start automatically

systemctl start mysqld
systemctl enable mysqld

View the default generated password

grep 'temporary password' /var/log/mysqld.log

Login to change password

mysql -uroot -p

Change Password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'NoPassword564925080!';

MySQL 5.7 has a password security check plug-in (validate_password) installed by default. The default password check policy requires that the password must contain uppercase and lowercase letters, numbers, and special symbols, and the length must not be less than 8 characters. Otherwise, the error message ERROR 1819 (HY000): Your password does not satisfy the current policy requirements will be displayed.

Authorize remote login users

GRANT ALL PRIVILEGES ON *.* TO 'noneplus'@'%' IDENTIFIED BY 'Noneplus564925080!' WITH GRANT OPTION;
flush privileges;

Open server port 3306

remote connection

Summarize

The above is the tutorial illustration of installing MySQL 5.7 GA version on CentOS 7.6 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 installing MySQL 5.7.6+ from source in CentOS 7
  • Detailed tutorial on installing mysql 8.0.13 (rpm) on Centos7
  • How to install mysql5.7.24 binary version on Centos 7 and how to solve it
  • Detailed installation tutorial of mysql 5.7 under CentOS 6 and 7
  • CentOS7 uses yum to install mysql 8.0.12
  • Detailed tutorial on installing MySQL 8.0 from source code on CentOS 7.4
  • Installation tutorial of mysql8.0rpm on centos7
  • Tutorial on installing lnmp using yum on centos7 (linux+nginx+php7.1+mysql5.7)

<<:  Vue implements upload component

>>:  MySQL 8.0.13 installation and configuration tutorial under CentOS7.3

Recommend

10 Tips to Improve Website Usability

Whether it is a corporate website, a personal blo...

How to use shell scripts in node

background During development, we may need some s...

WeChat applet realizes chat room function

This article shares the specific code of WeChat a...

A brief discussion on the maximum number of open files for MySQL system users

What you learn from books is always shallow, and ...

About debugging CSS cross-browser style bugs

The first thing to do is to pick a good browser. ...

Node+express to achieve paging effect

This article shares the specific code of node+exp...

Sample code for testing technology application based on Docker+Selenium Grid

Introduction to Selenium Grid Although some new f...

Unity connects to MySQL and reads table data implementation code

The table is as follows: Code when Unity reads an...

Use Docker Compose to quickly deploy ELK (tested and effective)

Table of contents 1. Overview 1.1 Definition 1.2 ...

How to start/stop Tomcat server in Java

1. Project Structure 2.CallTomcat.java package co...

How to run nginx in Docker and mount the local directory into the image

1 Pull the image from hup docker pull nginx 2 Cre...