Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juanbindez/connect-postgresql
postgres connect
https://github.com/juanbindez/connect-postgresql
Last synced: 3 days ago
JSON representation
postgres connect
- Host: GitHub
- URL: https://github.com/juanbindez/connect-postgresql
- Owner: JuanBindez
- License: mit
- Created: 2024-08-26T19:48:23.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-26T19:53:58.000Z (3 months ago)
- Last Synced: 2024-08-26T23:06:37.468Z (3 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DataBase
#### install postgresql on linux
sudo apt update
sudo apt install postgresql postgresql-contrib#### install flask and psycopg2 connector
pip install Flask psycopg2-binary#### access postgres
sudo -i -u postgres
psql### executar commands
CREATE USER myuser WITH PASSWORD 'mypassword';
ALTER USER myuser WITH SUPERUSER;
CREATE DATABASE mydatabase;
GRANT ALL PRIVILEGES ON DATABASE mydatabase TO myuser;
\q### list databases
\l### databse access
c\ mydatabase### verify useruser
sudo -i -u postgres
psql
\dn+### exit of the shell from postgreSQL
\q
exit