DateBase
Psql Mgmt

Database Setup

sudo -u postgres psql

Create Database and User

CREATE DATABASE code_monitor;
CREATE USER codemonitor WITH PASSWORD 'admin@123';
GRANT ALL PRIVILEGES ON DATABASE code_monitor TO codemonitor;

User Management

CREATE USER admin WITH PASSWORD 'admin';
ALTER USER admin WITH SUPERUSER;

Show Databases

\l

Connect to a Specific Database

\c your_database_name

Show Tables in the Current Database

\dt

Export Database

sudo -u postgres pg_dump -U postgres code_monitor > dbexport.pgsql

🧙 AI Wizard - Instant Page Insights

Click the button below to analyze this page.
Get an AI-generated summary and key insights in seconds.
Powered by Perplexity AI!