对于数据库咱们常用,使用源码包安装太费时间了,在网络较好的状况下。建议使用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;