⭐ 个人网站: www.mengyingjie.com ⭐
下载并安装mysqlmysql
第一步:安装从网上下载文件的wget命令sql
yum -y install wget
第二步:下载mysql的repo源shell
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
第三步:安装mysql-community-release-el7-5.noarch.rpm包segmentfault
rpm -ivh mysql-community-release-el7-5.noarch.rpm
第四步:查看下服务器
ls -1 /etc/yum.repos.d/mysql-community* /etc/yum.repos.d/mysql-community.repo /etc/yum.repos.d/mysql-community-source.repo
会得到两个mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo
网站
第五步:安装mysqlspa
yum install mysql-server
service mysql start
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
username:为用户名
%:表示全部外网IP均可以链接
password:是你本身设置的密码
-- 刷新权限表code
flush privileges;
启动防火墙server
systemctl start firewalld.service
第一种方法blog
第二种方法
遇到此类问题,但看了文章仍是未解决, 评论或加 QQ:781378815