What Happens If You No CREATE Privilege in a Database?
Submitted by: AdministratorIn order to create tables in a database, your user account must have the CREATE privilege for that database. Otherwise you will get an error as shown in the following tutorial exercise:
>cd mysqlin
>mysql -u guest -ppub
mysql> use ggl;
Database changed
mysql> CREATE TABLE test (id integer);
ERROR 1142 (42000): CREATE command denied to user
'guest'@'localhost' for table 'test'
If you get this error, you need to see the DBA to obtain the CREATE privilege.
Submitted by: Administrator
>cd mysqlin
>mysql -u guest -ppub
mysql> use ggl;
Database changed
mysql> CREATE TABLE test (id integer);
ERROR 1142 (42000): CREATE command denied to user
'guest'@'localhost' for table 'test'
If you get this error, you need to see the DBA to obtain the CREATE privilege.
Submitted by: Administrator
Read Online MySQL Programming Job Interview Questions And Answers
Top MySQL Programming Questions
☺ | What Is TIMESTAMP in MySQL? |
☺ | How To Use CASE Expression? |
☺ | How To Use Regular Expression in Pattern Match Conditions? |
☺ | How To Write Date and Time Literals? |
☺ | How To Delete an Existing Column in a Table? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |