Skip to content

Instantly share code, notes, and snippets.

@fbrnc
Created March 7, 2013 03:22
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fbrnc/5105358 to your computer and use it in GitHub Desktop.
Save fbrnc/5105358 to your computer and use it in GitHub Desktop.
Create MySQL database and grant access to user
CREATE USER 'play'@'localhost' IDENTIFIED BY 'play';
GRANT USAGE ON *.* TO 'play'@'localhost' IDENTIFIED BY 'play' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
CREATE DATABASE IF NOT EXISTS play DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON `play`.* TO 'play'@'localhost';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment