ファーウェイクラウドサーバーcentos 7.2 mysqlの簡単なインストール
883 ワード
https://www.cnblogs.com/longrui/p/6071581.html
CentOS 7 yum MariaDB MySQL, :
wget
yum -y install wget
mysql
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum
yum localinstall -y mysql57-community-release-el7-7.noarch.rpm
MySQL
yum install -y mysql-community-server
MySQL
systemctl start mysqld.service
MySQL5.7 root , ,
grep 'temporary password' /var/log/mysqld.log
MySQL , ,
( 、 , , ), :
SET PASSWORD = PASSWORD('your new password');
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
flush privileges;
。
:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'your password' WITH GRANT OPTION;