CentOS6.9 Installing mysql5.7.21 Tutorials

Source: Internet
Author: User

CentOS6.9 Installing mysql5.7.21 Tutorials
First
Installation succeeded:

STEP1: Check whether the system comes with the installation of MySQL

Yum List Installed | grep MySQL

STEP2: Delete the system's own MySQL and its dependencies

Yum-y Remove mysql-libs.x86_64

STEP3: Add a RPM source to CentOS and select a newer source
CeontOS6 can only be used el6.

3.1 Configuring the Yum source
Download the Yum source RPM installation package on the MySQL website:

3.2 Download MySQL source installation package
http://dev.mysql.com/downloads/repo/yum/

wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

3.3 Installing the MySQL source

Yum Localinstall mysql-community-release-el6-5.noarch.rpm

3.4 Viewing the Enabled condition

Yum Repolist All | grep MySQL

3.5 Setting Enable Mysql57

Check that the MySQL source is installed successfully

Yum Repolist enabled | grep "MySQL. -community."

See shown indicates successful installation.

3.6 Modify Enable mysql57

You can modify the Vim/etc/yum.repos.d/mysql-community.repo source to change the MySQL version of the default installation. For example, to install version 5.6, the 5.7 source of the enabled=1 changed to Enabled=0. Then change the 5.6 source enabled=0 to Enabled=1. The effect after the change is as follows:

3.7 View MySQL Enable condition

Yum Repolist enabled | grep MySQL

STEP4: Install MySQL server? Command:

Yum Install Mysql-community-server

If it goes well ...

STEP5: Start the MySQL service

Service Start mysqld

[OK]

STEP6: View root temporary password

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

2018-01-07t01:25:58.867073z 1 [Note] A temporary password is generated for [email protected]: umdn1uy4q>b;

It is also part of the password.

STEP7: Change root password

Mysql-uroot-p? ALTER USER ' root ' @ ' localhost ' identified by ' mynewpass4! ';

If you just write a simple like, 123456, you will get an error.
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

This is actually related to the value of Validate_password_policy.
The validate_password_policy has the following values:

The default is 1, which is medium, so the password you just started must match the length and must contain numbers, lowercase or uppercase letters, special characters.
Sometimes, just for your own testing, don't want to set the password so complicated, for example, I just want to set the root password is 123456.
Two global parameters must be modified:
First, modify the value of the Validate_password_policy parameter
mysql> set global validate_password_policy=0;
Query OK, 0 rows Affected (0.00 sec)

In this way, the criteria for judging the password is based on the length of the password. This is determined by the Validate_password_length parameter.

Mysql> SELECT @ @validate_password_length;
+----------------------------+
| @ @validate_password_length |
+----------------------------+
| 8 |
+----------------------------+
1 row in Set (0.00 sec)

STEP8: Setting up a remote user

Mysq>grant all privileges on . To ' oneusername ' @ '% ' of ' identified by ' userpassword! ' With GRANT OPTION;

[OK]

Attached: MySQL related files and paths:

If your environment is different, or if you have previously installed other versions of MySQL, you can refer to this article before uninstalling.
If you have any questions about this, please ask Dabigatran.

The main references are as follows:

1.CentOS 6.5/6.6 Installation (install) MySQL 5.7 The most complete version of the tutorial
1190000003049498
2.CENTOS7 64-bit under MySQL5.7 installation and configuration (YUM)
Http://www.linuxidc.com/Linux/2016-09/135288.htm

Uninstall MySQL database under 3.Linux

4.
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Http://www.cnblogs.com/ivictor/p/5142809.html

CentOS6.9 Installing mysql5.7.21 Tutorials

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.