Skip to content

Instantly share code, notes, and snippets.

@redteam-snippets
Created March 8, 2012 15:58
Show Gist options
  • Save redteam-snippets/2001656 to your computer and use it in GitHub Desktop.
Save redteam-snippets/2001656 to your computer and use it in GitHub Desktop.
MySQL: Create User & Database & Assign Ownership
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