通过
grant all privileges on *.* to 'admin'@'%' identified by 'han12345' with grant option
然后
flush privileges;
创建一个外部用户admin可以访问数据库
如果访问不了可以通过以下命令打开3306端口
firewall-cmd --add-port=3306/tcp --permanent
或者关闭防火墙
通过
grant all privileges on *.* to 'admin'@'%' identified by 'han12345' with grant option
然后
flush privileges;
创建一个外部用户admin可以访问数据库
如果访问不了可以通过以下命令打开3306端口
firewall-cmd --add-port=3306/tcp --permanent
或者关闭防火墙