I have created a user with this command
CREATE USER 'bean'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON databaseA.* to 'bean'@'localhost';
However, when I login as bean I am able to se information_schema and test databases. From my understanding, shouldn’t bean only capable of seeing databaseA?
I also try to run use information_schema and apparently there is nothing stopping bean from doing so.
So, are information_schema and test accessible to every user?
FYI, the root user comes with these default tables: information_schema, mysql, test. And yes, bean cannot see mysql, which makes me think that maybe those table are accessible to every user.
Is there a way that I could do so that bean only capable of accessing databaseA, not others?
The
information_schemais always accessible; you even cannot grant privileges to this database.About the
testdatabase from the reference – The test database often is available as a workspace for users to try things out.