Skip to content

Instantly share code, notes, and snippets.

@lzcabrera
Created June 4, 2013 23:03
Show Gist options
  • Save lzcabrera/5710379 to your computer and use it in GitHub Desktop.
Save lzcabrera/5710379 to your computer and use it in GitHub Desktop.
Commands needed to create a new username and database in MySQL.
mysql -u adminusername -p
CREATE USER 'username'@'localhost' IDENTIFIED BY 'mypass';
CREATE DATABASE databasename;
GRANT ALL PRIVILEGES ON databasename.* TO "username"@"localhost" IDENTIFIED BY "password";
FLUSH PRIVILEGES;
EXIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment