Skip to content

Instantly share code, notes, and snippets.

@lukzgois
Created May 8, 2015 12:32
Show Gist options
  • Save lukzgois/79a5e89e67ef7344cae1 to your computer and use it in GitHub Desktop.
Save lukzgois/79a5e89e67ef7344cae1 to your computer and use it in GitHub Desktop.
mysql tricks
// 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