Linux (CENTOS7) YUM installed mysql5.7

  Reference Address: https://www.cnblogs.com/linjiqin/p/7611204.html

  NOTE: The address is CENTOS6 * title written version, but I * above installation is made perfect in my CENTOS7..

  The following content is copied from the address above me over, with slight modifications.

Mysql download source installation package 
# wget HTTP: // dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 
 
install mysql source package 
# yum localinstall mysql57-Community Community-Release-el7- 8 .noarch .rpm 

check whether the installation was successful source mysql 
# yum repolist Enabled | grep  " - Community Community mysql * *.. " 

to see the figure below (three) indicates success: 
mysql -connectors-Community Community Community Community MySQL Connectors       36 
mysql -tools-MySQL Community Community Tools Community Community            47 
mysql57 -community MySQL5. 7 Community Community Server       189
 
Installing MySQL service 
# yum  install MySQL-community- Server 

start MySQL service 
# systemctl start mysqld 
 
view MySQL startup state 
# systemctl status mysqld 

set boot 
# systemctl enable mysqld 
# systemctl daemon - reload # reload 
 
to view the default password root 
# grep  ' password Temporary ' / var / log / mysqld.log 

modified root password 
# MySQL -uroot-- P 

MySQL > the ALTER the USER ' root ' @ ' localhost ' the IDENTIFIED BY ' abc1234! '; 
Or 
MySQL > the SET password for ' root ' @ ' localhost ' = password ( ' ABC1234! ' ); 

Note: mysql5.7 default installation password security check-ins (validate_password), check the default password policy requires password must contain: case letters, numbers and special symbols, and the length can not be less than eight. Otherwise it will prompt ERROR 1819 (HY000): Your passworddoes not Satisfy at The Current Policy requirements error 

add a remote connection to log on users, such as: username: root, password: ABC1234 ! 
MySQL .> GRANT ALL PRIVILEGES ON * * the TO ' root ' @ ' % ' the IDENTIFIED BY ' abc1234! ' the WITH the GRANT the OPTION;

# Systemctl restart mysqld 

I use here SQLyog link, if the link report similar to the following error: 
    Host '' IS not allowed to Connect to the this MySQL Server 
, please refer to the following links: HTTPS: // blog.csdn.net/liguoqingxjxcc/article/details / 82350411

 

Guess you like

Origin www.cnblogs.com/kawhileonardfans/p/10966850.html