postgresql

postgresql on linux comes with a default "repl" used by invoking psql
it has alot of nice features, more than mysql
the psql program's \l meta-command and -l command-line option are also useful for listing the existing databases.
[cite:@postgresql_161 chapter 23 managing databases]

database creation

create database <name>
https://www.postgresql.org/docs/current/sql-createdatabase.html

list databases

\l

ERROR: template database "template1" has a collation version mismatch

execute sql file

psql --username=<db_user_name> databasename < myfile.sql
https://stackoverflow.com/questions/6842393/import-sql-dump-into-postgresql-database

postgresql cheatsheet

https://wiki.archlinux.org/title/PostgreSQL
BROKEN sql
GRANT ALL PRIVILEGES ON DATABASE EXAMPLE_DB TO EXAMPLE_USER;
GRANT ALL ON SCHEMA public TO EXAMPLE_USER;
ALTER USER user WITH PASSWORD 'password';
psql -U username -d myDataBase -a -f myInsertFile
psql-17 -U postgres -d gramsci -a -f ~Downloadsgramsci_mock_complete_02.11.25.sql
BROKEN