MariaDB允许远程连接

一、数据库操作

连接数据库

[root@app bin]# ./mysql -u root -p

授权并刷新权限

grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
flush privileges;

查看用户数据

use mysql
select user, password, host from user;

二、防护墙操作

CentOS 7关闭防火墙

https://blog.csdn.net/haveqing/article/details/112376378

注意别忘了关闭iptables

三、安全组设置规则

如果是阿里云ECS服务器,安全组设置规则,入方向添加3306

安全组规则,一般及时生效

猜你喜欢

转载自blog.csdn.net/haveqing/article/details/112376601
今日推荐