CentOS 7.3下安装MySql
1、下载mysql源安装包 wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 2、安装mysql源 yum localinstall mysql57-community-release-el7-8.noarch.rpm 3、检测源是否安装成功 yum repolist enabled | grep "mysql.*-community.*"//成功后结果如下图 4、安装mysql服务 yum –y install mysql-community-server 此处看网速有快有慢 5、安装后,启动mysql服务 systemctl start mysqld 6、查看mysqld服务,此处要是查看到active,状态是running那就表明已经启动成功。 systemctl status mysqld 7、设置开机启动 systemctl enable mysqld 8、重载服务 systemctl daemon-reload 9、mysql5.7安装时会产生一个默认的密码,查看此密码的文件一般存/var/log/mysqld.log上 查看临时密码 grep 'temporary password' /var/log/mysqld.log 10、输入密码后就会显示黑白的欢迎界面了,到这里