Hai*_*uha 2 mysql database mariadb
我用这个命令创建了一个用户
CREATE USER 'bean'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON databaseA.* to 'bean'@'localhost';
但是,当我登录时,bean我能够se information_schema和test数据库.从我的理解,不应该bean只能看到databaseA?
我也尝试跑步use information_schema,显然没有什么能阻止bean这样做.
那么,每个用户都可以访问information_schema和test吗?
仅供参考,root用户自带这些默认表:information_schema,mysql,test.是的,bean看不到mysql,这让我觉得可能每个用户都可以访问这些表.
有没有办法可以这样做,bean只能访问databaseA,而不是其他人?
小智 7
我有同样的问题在phpMyAdmin(config.inc.php)的配置文件中,你可以添加:
$cfg['Servers'][$i]['hide_db'] = 'information_schema';
这将隐藏该DB ...