PostgreSQL¶
Tips and Docs¶
Installation¶
Debian/Ubuntu
Start the Postgres service
Connect to PostgreSQL via pgsql (localhost)¶
Create a PostgreSQL user and database
CREATE USER your_username WITH PASSWORD 'your_password';
CREATE DATABASE database_name;
GRANT ALL PRIVILEGES ON DATABASE database_name TO your_username;
\q
Check your database username and connection
PG commands¶
Change PG password¶
Print POSTGRES environment variables¶
Connect from the other host¶
-
Find the line
#listen_addresses = 'localhost'and change it to:listen_addresses = '*' -
Change the interface listener for all connections