Difference between revisions of "Database"

From Things and Stuff Wiki
Jump to navigation Jump to search
(a move)
 
Line 25: Line 25:
  
 
=== Commands ===
 
=== Commands ===
 +
[http://www.softwareprojects.com/resources/programming/t-how-to-restrict-mysql-user-access-to-a-single-datab-1734.html]
 +
GRANT ALL ON USERDATABASE.* TO 'USERNAME';
 +
 
Create command list for showing user grants [http://www.pythian.com/news/1165/creative-sql-how-to-easily-show-grants-for-many-users/]
 
Create command list for showing user grants [http://www.pythian.com/news/1165/creative-sql-how-to-easily-show-grants-for-many-users/]
 
  SELECT CONCAT("SHOW GRANTS FOR '",user,"'@'",host,"';") FROM mysql.user WHERE host!='localhost';
 
  SELECT CONCAT("SHOW GRANTS FOR '",user,"'@'",host,"';") FROM mysql.user WHERE host!='localhost';

Revision as of 00:38, 23 May 2012