Sunday 15 July 2012

Revoke privileges from user in mySQL -


We create statements in mySQL for each new user

  USER newuser @ Localhost Create 'password' identification;   

"Show GRANTS" is showing only "USAGE ON *. *" Privileges.

But the user is able to choose, insert. "Examination" and "Information_sma" database and I have canceled these privileges to abrogate the "test". Error 1141 (42000): There is no such grant for the user 'guest' on host 'localhost'. I / P>

< P>

By default, the mysql.db table contains such rows that can be used by any user in the test database and other code Allow entries with names that start with test_ . (...) This means that such a database can also be used by those accounts which are otherwise not owned by the privileges. If you want to delete any user access to test the database, then do this:

  mysql> Remove from Mysql.db where 'test%' like DB; Mysql & gt; Flush Pvt .;   

(...) With preceding changes, only users with global database privileges or those explicitly granted privileges can be used for test databases.

info_schema is a read-only pseudo database built on a fly over a database request. Users will always be able to consult this database, but it only presents those entries for which they can otherwise gain access.

No comments:

Post a Comment