Skip to content

Instantly share code, notes, and snippets.

@hilios
Created October 29, 2012 16:14
Show Gist options
  • Save hilios/3974553 to your computer and use it in GitHub Desktop.
Save hilios/3974553 to your computer and use it in GitHub Desktop.
Create DB and User in MySQL
--
CREATE DATABASE dbname DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
-- Where % is the wildcard for any host
GRANT ALL PRIVILEGES ON dbname.* TO 'user'@'host' IDENTIFIED BY 'password' WITH GRANT OPTION;
-- Update users privileges access
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment