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.

Advertisements

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