Grant privileges with MySql

Description:

Grant privileges on a number of databases containing the same prefix.

Solution:

The tricky part is to take care of the right quotes to use, in particular the backtick ( ` )

Syntax is then as follows:

GRANT ALL ON `wordpress_%`.* TO ‘user’@’localhost’ IDENTIFIED BY ‘longasspassword’;

ALL can be, of course whichever required from SELECT DELETE INSERT….. .

Also use a strong password generator, like http://strongpasswordgenerator.com/ is much better then anything you could come up with.

About admin

Just another php developer trying to give something back to the community.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment