Created
December 28, 2015 18:35
-
-
Save rodrigograca31/80db32842249b8df3f1a to your computer and use it in GitHub Desktop.
Create mysql user and give permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE USER 'user'@'%'; | |
SET PASSWORD FOR 'user'@'%' = PASSWORD('password'); | |
GRANT ALL PRIVILEGES ON database.* TO 'user'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SELECT User,Host FROM mysql.user;