mysql5.7

下载RPM
http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm

安装YUM
sudo yum localinstall mysql57-community-release-el7-7.noarch.rpm

安装MYSQL

启动MYSQL

设备外网IP可以访问
GRANT ALL PRIVILEGES ON . TO ‘用户名’@’%’ IDENTIFIED BY ‘密码’ WITH GRANT OPTION;
比如你想让root用户通过外网访问 (root帐号的密码是123456)
GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘123456’ WITH GRANT OPTION;

如果还访问不了请检查防火墙或安全组是否允许3306。