Skip to content

Instantly share code, notes, and snippets.

@rodrigograca31
Created December 28, 2015 18:35
Show Gist options
  • Save rodrigograca31/80db32842249b8df3f1a to your computer and use it in GitHub Desktop.
Save rodrigograca31/80db32842249b8df3f1a to your computer and use it in GitHub Desktop.
Create mysql user and give permissions
CREATE USER 'user'@'%';
SET PASSWORD FOR 'user'@'%' = PASSWORD('password');
GRANT ALL PRIVILEGES ON database.* TO 'user'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
@rodrigograca31
Copy link
Author

SELECT User,Host FROM mysql.user;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment