第四章:数据控制语言DCL-禁止root用户远程登录

直接学习:https://edu.csdn.net/course/play/27328/370706
禁止root用户远程登录
#1、为什么禁止root用户远程登录?
1、root是mysql用户的超级管路员,几乎拥有所有权限,一旦泄露后果很严重。
2、root是mysql数据库的默认用户,所有人都知道,如果不禁止远程登录,可以针对root用户暴力破解密码。
#代码示例如下:

use mysql;
show tables;
select * from user;
select user,host from user;
update user set host = 'localhost ' where user = 'liufeng';
select user,host from user;
发布了107 篇原创文章 · 获赞 6 · 访问量 968

猜你喜欢

转载自blog.csdn.net/weixin_43597208/article/details/105471592