How to prevent a user from accessing a specific scheme?

I have a server that was created for me. It has a circuit called "test" on it.

I logged in with the root user and created a new scheme called "WEB".

create schema WEB; 

What I want to do now is to have a user who can only see this new scheme.

So, I created the user like this:

 create user webtestuser identified by 'webtestuser'; grant select, insert, update, delete on WEB.* to webtestuser; 

The problem is that when I log in with a new user, I still see the test pattern. Even when I “nullify everything” on the user, this diagram is still visible.

Anything I miss here?

Thanks!

+4
source share
1 answer

By default, mysql comes with some grants for installed test circuits. They are ALL ON test for all users, as well as ALL ON test\_% for all users ( test\_% corresponds to things like test_foo , test_123 )

Due to how they are defined, I see no way to remove these grants using the REVOKE ... FROM syntax, so you will need to use the following:

 DELETE FROM mysql.db WHERE Db IN("test","test\_%") AND User="" AND Host="%"; FLUSH PRIVILEGES; 
+3
source

All Articles