Created
March 14, 2014 17:45
-
-
Save shanonvl/9552916 to your computer and use it in GitHub Desktop.
MySQL: Create Database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci; | |
GRANT ALL ON `mydb`.* TO `username`@localhost IDENTIFIED BY 'password'; | |
FLUSH PRIVILEGES; | |
-- Alternatively, you can use ‘CREATE SCHEMA’ instead of ‘CREATE DATABASE’: | |
-- CREATE SCHEMA `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci; | |
-- GRANT ALL ON `mydb`.* TO `username`@localhost IDENTIFIED BY 'password'; | |
-- FLUSH PRIVILEGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment