MySQL Programming Question:
Download Questions PDF

What Happens If You No CREATE Privilege in a Database?

Answer:

In 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.

Download MySQL Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How To Create a New Table in MySQL?How To Get a List of All Tables in a Database?