Mani's Blog

September 2, 2011

MySQL: ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

Filed under: MySQL — mani @ 10:26 pm

The requirement is the script needed super privileges to create tables,triggers and few other objects on specific database.   I ran into this error.

(root@localhost) [(none)]> grant super on inv0.* to inv0@’%’;
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

Super is one of the privileges should be granted as global not specific to the database.  Grant is like this.

(root@localhost) [(none)]> grant super on *.* to inv0@’%’;
Query OK, 0 rows affected (0.00 sec)

Advertisements

1 Comment »

  1. Thank you. This was a very useful tip, just at this moment.

    Comment by Tomas — June 7, 2012 @ 9:51 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: