mysql create users and grant privileges

## Create user; You can change localhost for ip or domain of your database server.

create user 'user'@'localhost' identified by 'password';

 

## Grant privileges to a existent user, where all may be substituted for [all, alter, create, drop, etc], * may be substituted for especific table name.

grant all on database.tables to 'user'@'host' identified by 'password'

 

Advertisements

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