centos7 install mysql5.7.27

一、yum 安裝 wgethtml

yum install wget

二、下載MySQL 的yum repomysql

wget https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm

三、安裝 mysql57-community-release-el7-11.noarch.rpmsql

yum install -y mysql57-community-release-el7-11.noarch.rpm

四、查看是否安裝成功spa

yum list |grep mysql

五、修改yum倉庫源code

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache

六、正式安裝server

yum -y install mysql-community-server

七、查看安裝結果htm

yum list installed|grep mysql

八、查看MySQL服務狀態blog

systemctl status mysqld

九、啓動MySQL服務get

systemctl start mysqld

十、修改MySQL   root密碼it

grep "password" /var/log/mysqld.log

mysql -uroot -p

set global validate_password_policy=0;

set global validate_password_length=0;

ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';

十一、開啓遠程訪問

use mysql

select host,user from user;

update user set host='%' where user='root';

flush privileges;

十二、打開防火牆3306端口

相關文章
相關標籤/搜索