Install mysql 5.6 from yum source in centos7.4 system

Install mysql 5.6 from yum source in centos7.4 system

System environment: centos7.4

1. Check whether the database is installed:

yum list installed | grep mysqld/mariadb

Second, install the yum source RPM resource package of the centos7 system with the mysql5.6 installation package:

rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

yum clean all

yum repolist

3. Install msyql5.6:

yum -y install mysql-community-server

Fourth, start the service:

systemctl start mysqld

systemctl enable mysqld

5. Reset password: It depends on the specific situation (can be omitted, log in without password)

#mysql_secure_installation

Set root password? [Y/n] y [Set root user password]

Remove anonymous users? [Y/n] y [Remove anonymous users]

Disallow root login remotely? [Y/n] n [Disallow root login remotely]

Remove test database and access to it? [Y/n] y [Delete test database]

Reload privilege tables now? [Y/n] y [Refresh privileges]

6. Check the mysql version:

mysql -V

mysql Ver 14.14 Distrib 5.6.39, for Linux (x86_64) using EditLine wrapper

7. Verification: (no password)

mysql -uroot -p 密碼

8. Set password and remote permissions

Database password setting: # set password for 'root'@'localhost'=password('userpasswd');

9. Configure the firewall

firewall-cmd --zone=public --add-port=3306/tcp --permanent

You may also be interested in:
  • Restart MariaDB with mysql under Centos7
  • How to install and modify the initial password of mysql5.7.18 under Centos7.3
  • MySQL installation tutorial under Linux centos7 environment
  • Reasons and solutions for being unable to remotely connect to MySQL database under CentOS7
  • Detailed explanation of how to modify the password of the specified mysql user in Centos7
  • 64-bit CentOs7 source code installation mysql-5.6.35 process sharing
  • Detailed tutorial on installing MySQL on CentOs7.x
  • MySQL 5.7.17 installation and configuration method graphic tutorial (CentOS7)
  • Alibaba Cloud CentOS7 builds Apache+PHP+MySQL environment
  • Detailed steps to install Mysql5.7.19 using yum on Centos7

<<:  The latest popular script Autojs source code sharing

>>:  Analysis and description of network configuration files under Ubuntu system

Recommend

Use of select, distinct, and limit in MySQL

Table of contents 1. Introduction 2. select 2.1 Q...

Detailed explanation of how to gracefully delete a large table in MySQL

Preface To delete a table, the command that comes...

Teach you how to quickly enable self-monitoring of Apache SkyWalking

1. Enable Prometheus telemetry data By default, t...

How to optimize a website to increase access speed update

Recently, the company has begun to evaluate all s...

WeChat applet implements video player sending bullet screen

This article shares the specific code for WeChat ...

Examples of new selectors in CSS3

Structural (position) pseudo-class selector (CSS3...

Summary of the use of special operators in MySql

Preface There are 4 types of operators in MySQL, ...

Vue encapsulation component upload picture component

This article example shares the specific code of ...

Why is it not recommended to use an empty string as a className in Vue?

Table of contents Compare the empty string '&...

Tutorial on setting up scheduled tasks to backup the Oracle database under Linux

1. Check the character set of the database The ch...

Basic knowledge of website design: newbies please read this

Now many people are joining the ranks of website ...

Summary of knowledge points about covering index in MySQL

If an index contains (or covers) the values ​​of ...

Linux process management tool supervisor installation and configuration tutorial

Environment: CentOS 7 Official documentation: htt...

Implementation of postcss-pxtorem mobile adaptation

Execute the command to install the plugin postcss...

Detailed explanation of gcc command usage under Linux system

Table of contents 1. Preprocessing 2. Compilation...