Skip to content

Instantly share code, notes, and snippets.

@francois-blanchard
Created December 11, 2014 10:11
Show Gist options
  • Save francois-blanchard/c08e55201222392e792c to your computer and use it in GitHub Desktop.
Save francois-blanchard/c08e55201222392e792c to your computer and use it in GitHub Desktop.
Add user MySQL

Add user MySQL

> CREATE DATABASE name_database;
> CREATE USER 'name_user'@'ip_or_localhost' IDENTIFIED BY 'choose_password';
> GRANT ALL PRIVILEGES ON name_database.* TO 'name_user'@'ip_or_localhost';
> FLUSH PRIVILEGES;

Delete user

> DROP USER ‘name_user’@‘ip_or_localhost’;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment