Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Grant User Privileges at the Database Level
How To Grant User Privileges at the Database Level? - MySQL FAQs - Managing User Accounts and Access Privileges
✍: FYIcenter.com
If you want to grant a user privilege at the database level, you can use the "GRANT privilegeName ON databaseName.* TO userName" command. The argument "databasename.*" in the command stands for all tables in the specified database. The following tutorial exercise shows you how to create a new database and grant access privilege to a user only for this new database:
>cd \mysql\bin >mysql -u root -pretneciyf mysql> CREATE DATABASE faq; Query OK, 1 row affected (0.04 sec) mysql> CREATE USER qa IDENTIFIED BY 'iyf'; Query OK, 0 rows affected (0.24 sec) mysql> GRANT CREATE ON faq.* TO qa; Query OK, 0 rows affected (0.00 sec) mysql> QUIT; >mysql -u qa -piyf mysql> USE faq; Database changed mysql> USE fyi; ERROR 1044 (42000): Access denied for user 'qa'@'%' to database 'fyi'
2007-05-10, 5030👍, 0💬
Popular Posts:
What print out will the folloging code produce? main() { char *p1=“name”; char *p2; p2=(char*)malloc...
How To Run a JUnit Test Class? A JUnit test class usually contains a number of test methods. You can...
How To Create an Array in PL/SQL? - Oracle DBA FAQ - Introduction to PL/SQL If you want create an ar...
What does a special set of tags <?= and ?> do in a PHP script page? <?= express...
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by p...