Created
March 8, 2012 15:58
-
-
Save redteam-snippets/2001656 to your computer and use it in GitHub Desktop.
MySQL: Create User & Database & Assign Ownership
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
select user from mysql.user; | |
create user 'USER_NAME'@'localhost' identified by 'PASSWORD'; | |
show databases; | |
create database DATABASE_NAME; | |
grant all on DATABASE_NAME.* to 'USER_NAME'@'localhost' identified by 'PASSWORD'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment