Installing mysql5.6 with Yum under Linux (CentOS)
Preparing: Installing MySQL Yum Repository, https://dev.mysql.com/downloads/repo/yum/
View the current Linux (Red Hat) version number: Cat/proc/version
View CentOS version number: Cat/etc/redhat-release
GLIBC Upgrade: Yum Update glibc
Newly opened cloud server, need to detect whether the system comes with the installation of MySQL
# Yum List Installed | grep MySQL
If you find a system that comes with MySQL, do it decisively
# yum-y Remove mysql-libs.x86_64
Then execute this sentence and explain that this rpm is not a MySQL installation file, just two yum source files, executed after the/etc/yum.repos.d/ This directory has more Mysql-community-source.repo and Mysql-community.repo
# RPM-IVH mysql-community-release-el6-5.noarch.rpm
This time, you can use the Yum repolist mysql command to see if there are already MySQL installable files
#yum Repolist All | grep MySQL
Select the version you want to install, such as MySQL 5.6, modify the/etc/yum.repos.d/mysql-community.repo file, and set enabled=1 under MySQL 5.6
Vi/etc/yum.repos.d/mysql-community.repo (which version is enabled which, example: Mysql5.6--enable=1, others set to 0)
Review the installable version again
# Yum Repolist enabled | grep MySQL
The installation process may occur when the mirror server connection fails, and the installation command can be re-executed
# yum Install Mysql-community-server
View the installation version and whether the installation was successful
Yum List Installed | grep MySQL
1 Modify the MySQL configuration file (default is/ETC/MY.CNF), add a row of skip-grant-tables under [mysqld];
2 Starting Mysql:systemctl start mysqld
3 Input Mysql:mysql--log in to MySQL
4 Change the root password:
Update mysql.user Set authentication_string = password (' 123456 ') where user = ' root ' and host = '% '; --Modify the password for the corresponding user remote access permission MySQL 5.7
Update mysql.user Set authentication_string = password (' 123456 ') where user = ' root '; --Modify the password for all access paths under the specified user MySQL 5.7
Flush privileges;
--mysql 5.6 Change Password:
Use MySQL
UPDATE user SET Password=password (' 123456 ') where user= ' root ';
Flush privileges;
5 Edit/etc/my.cnf Adjust the skip-grant-tables under [mysqld] to:
#skip-grant-tables
Add a row (MySQL database ignores table name capitalization):
Lower_case_table_names=1
6 Restart Mysql:systemctl Restart Mysqld
7. View MySQL Current version
Terminal input: Mysql-v
--Set MySQL database to ignore table name case, add under My.cnf [mysqld]:
Lower_case_table_names=1
Add: Grant all permissions to the root user in order to enable remote access
Grant all privileges on * * to [email protected]%;
Mysql5.6_linux under Yum installation