下載並安裝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