Last active
February 1, 2016 20:35
-
-
Save scottoffen/10560794 to your computer and use it in GitHub Desktop.
Create New MySQL Database (with user)
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
-- Using GRANT for creating new users has been deprecated and will be removed in the future | |
-- as of 5.7.1 | |
-- Create a new user | |
create user '[username]'@'[host]' identified by '[password]'; | |
-- Create a new database/user | |
create database [schema]; | |
-- Grant user access to database | |
grant all on [schema].* to '[username]'@'[host]' identified by '[password]'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment