How to create a user with PostgreSQL?
Here is a quick tutorial for today using Postgresql on Command Line using a terminal in Linux:
sudo -u postgres createuser jammy
sudo -u postgres createdb my_local_db
sudo -u postgres psql (get into command line interface mode)
- ALTER USER jammy WITH PASSWORD ‘my_new_shiny_password’;
- GRANT ALL PRIVILEGES ON DATABASE my_local_db to jammy
Once you install the Postgres tool, the process should be the same with Windows and Mac.
You can also use free GUI tools such as: