對於數據庫咱們常用,使用源碼包安裝太費時間了,在網絡較好的狀況下。建議使用yum在線安裝MySQL,很是方便!mysql
1.CentOS 7
2.關閉防火牆,加強性
3.可鏈接外網sql
yum -y install wget
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm數據庫
yum localinstall mysql57-community-release-el7-8.noarch.rpmvim
yum repolist enabled | grep "mysql.-community." 網絡
yum install mysql-community-server ide
vim /etc/yum.repos.d/mysql-community.repo.net
systemctl start mysqld
systemctl status mysqld 3d
systemctl enable mysqld
systemctl daemon-reload #重載服務版本控制
grep 'temporary password' /var/log/mysqld.log server
mysql -uroot -p
set password for 'root'@'localhost'=password('mypass@123#!');
grant all privileges on . to 'root'@'%' identified by 'abc123' with grant option; #設置權限
flush privileges;