下载并安装mysqlsql
第一步:安装从网上下载文件的wget命令shell
yum -y install wget
复制代码
第二步:下载mysql的repo源bash
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
复制代码
第三步:安装mysql-community-release-el7-5.noarch.rpm包服务器
rpm -ivh mysql-community-release-el7-5.noarch.rpm
复制代码
第四步:查看下post
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;
复制代码
启动防火墙cdn
systemctl start firewalld.service
复制代码
第一种方法
第二种方法
遇到此类问题,但看了文章仍是未解决, 评论或加 QQ:781378815