This article mainly introduces the detailed steps of using yum to install Mysql5.7.19 on Centos7. The editor thinks it is quite good, so I will share it with you now and give it as a reference. Let’s follow the editor and take a look.
The yum source of Centos7 does not have mysql by default, because mysql has been replaced by mariaDB.
First we download the repo source of mysql. We can go to the mysql official website to find the latest repo source address
##Address: https: //dev.mysql.com/downloads/repo/yum///下载mysql rpm包 # wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm //安装mysql rpm包 # rpm -ivh mysql57-community-release-el7-11.noarch.rpm //安装mysql # yum install mysql-community-server
# service mysqld restart
[root@local bin]# grep "password" /var/log/mysqld.log 2017-09-24T08:03:30.664086Z 1 [Note] A temporary password is generated for root@localhost: 8A3xwbk8_P1A
[root@local bin]# mysql -uroot -p Enter password:
mysql> SET password=PASSWORD("mysql123"); ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
##
mysql>grant all privileges on *.* to username@'%' identified by 'password';
The above is the detailed content of How to use yum to install Mysql5.7.19 on Centos7. For more information, please follow other related articles on the PHP Chinese website!