Last active
May 14, 2019 13:15
-
-
Save crossle/ba645c467550e0a1af3d280e529b2173 to your computer and use it in GitHub Desktop.
Postgresql command
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 database_name; | |
CREATE USER my_username WITH PASSWORD 'my_password'; | |
GRANT ALL PRIVILEGES ON DATABASE "database_name" to my_username; | |
psql -U postgres | |
ALTER TABLE <tablename> OWNER TO <username> | |
ALTER DATABASE name OWNER TO new_owner; | |
sudo su - postgres | |
psql | |
# \password postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment