Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Creating new users and databases
# Postgres
psql -d postgres
CREATE USER user_name WITH PASSWORD 'password';
CREATE DATABASE database_name WITH OWNER user_name;
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