GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON databasename.* TO username'@'localhost' IDENTIFIED BY 'password';
...
If successful, MySQL will reply with:

Query OK, 0 rows affected

To activate the new permissions, enter the following command:

FLUSH PRIVILEGES;

But using the GRANT command doesn't require to flush privileges. The changes would be applied instantly. We only need the flush privileges if we manually modified the mysql database using UPDATE or INSERT.

CommentFileSizeAuthor
#1 137213.patch509 bytesblakehall

Comments

blakehall’s picture

Status: Active » Needs review
StatusFileSize
new509 bytes

Makes sense according to the MySQL 5.1, MySQL 5.0, and MySQL 4.1 Documentation.

Patch attached...

(Will backport if desired)

webchick’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Simple, and logical. Committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)