Created
May 7, 2012 10:06
-
-
Save petercossey/2627019 to your computer and use it in GitHub Desktop.
Setup a new database and database 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
CREATE DATABASE db_name; | |
GRANT USAGE ON *.* TO 'db_user'@'hostname' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON db_name.* TO 'db_user'@'hostname'; | |
# Shorter | |
create database db_name; | |
grant all on db_name.* to 'db_user' identified by 'password'; | |
flush privileges; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment