0

I use the root to create a new user, like this: enter image description here

I have no more operations on it. Then I use this user to log in: enter image description here

I try to do some operations like this: enter image description here

Here "test" is a database which I created before. Why can I do all the operations? I have not done any grant operation on the test user. When I come back to use the root user to log in, I also cannot revoke the privileges on test(database) for test(user), like this: enter image description here

I am really confused by these things, and this is my first time to ask question on StackExchange. My English is also not very good. If you cannot understand what I am talking about just tell me, I will reply soon.

1

If I am not mistaken, the test Database is created by default.

In addition, the mysql.db table contains rows that permit all accounts to access the test database and other databases with names that start with test_. This is true even for accounts that otherwise have no special privileges such as the default anonymous accounts. This is convenient for testing but inadvisable on production servers. Administrators who want database access restricted only to accounts that have permissions granted explicitly for that purpose should remove these mysql.db table rows.

http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

Try to create a new DB with a different name and repeat your steps.

Hope this will help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.