Skip to content

Instantly share code, notes, and snippets.

@alexshenia
Forked from dmishh/create-user-and-db.sql
Created November 29, 2015 12:44
Show Gist options
  • Save alexshenia/f1fdcce9ad286df0719f to your computer and use it in GitHub Desktop.
Save alexshenia/f1fdcce9ad286df0719f to your computer and use it in GitHub Desktop.
CREATE USER 'USER'@'localhost' IDENTIFIED BY 'PWD';
GRANT USAGE ON *.* TO 'USER'@'localhost' IDENTIFIED BY 'PWD' 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 `DATABASE`;
GRANT ALL PRIVILEGES ON `DATABASE`.* TO 'USER'@'localhost';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment