Created
May 8, 2015 12:32
-
-
Save lukzgois/79a5e89e67ef7344cae1 to your computer and use it in GitHub Desktop.
mysql tricks
This file contains hidden or 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
// criar usuário | |
CREATE USER 'test'@'localhost' IDENTIFIED BY 'your_password'; | |
// criar banco de dados | |
CREATE DATABASE mydb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; | |
// conceder privilégios a um usuário | |
GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'%' WITH GRANT OPTION; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment