Skip to content

Instantly share code, notes, and snippets.

@wancw
Created March 20, 2009 04:54
Show Gist options
  • Save wancw/82220 to your computer and use it in GitHub Desktop.
Save wancw/82220 to your computer and use it in GitHub Desktop.
GRANT ALL ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON db_name.* TO 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'127.0.0.%' IDENTIFIED BY 'password' WITH GRANT OPTION;
GRANT REPLICATION SLAVE ON *.* TO repl@"192.168.1.%" IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment