关闭防火墙的情况下
sudo vim /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
sudo service iptables restart
mysql > use mysql;
#创建openscanner用户与密码并设置为从安装mysql服务的机器本地访问
mysql > grant all on openscannerstore.* to 'openscanner'@'localhost'
identified by 'scanner888';
#设置openscanner用户与密码,并从任何机器都可以访问mysql
mysql > grant all on openscannerstore.* to 'openscanner'@'%' identified by 'scanner888';
mysql > flush privileges; #刷新才会生效