Last active
March 13, 2016 04:38
-
-
Save mixxorz/d3e99ebbb1b3d75a1bda to your computer and use it in GitHub Desktop.
Creating new users and databases
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
# Postgres | |
psql -d postgres | |
CREATE USER user_name WITH PASSWORD 'password'; | |
CREATE DATABASE database_name WITH OWNER user_name; | |
# MySQL | |
mysql -u root -p | |
CREATE DATABASE database_name; | |
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON database_name.* TO 'newuser'@'localhost'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment