我用这个命令创建了一个用户
CREATE USER 'bean'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON databaseA.* to 'bean'@'localhost';
但是,当我登录时,我bean可以查看数据库。以我的理解,不应该只是能看见吗?information_schematestbeandatabaseA
我也尝试跑步use information_schema,显然没有什么可以阻止bean这样做。
那么,每个用户都可以访问 information_schema 和 test 吗?
仅供参考,root用户带有这些默认表:information_schema、mysql、test。是的,bean看不到 mysql,这让我觉得每个用户都可以访问这些表。
有没有办法让我bean只能访问databaseA,而不是其他人?