Postgresql Error: psql: FATAL: database "root" does not exist
Cause: A database named 'root' does not exist on your system
Solution:This error trips up new PostgreSQL users quite often. When you simply run psql from the command line it, by default, attempts to log you into a database with the same name as your current Unix user name. In this case that is 'root', but it could be 'postgres', or 'bob'.
If you are setting up your database for the first time, you will need to become the PostgreSQL user ( typically 'postgres' ) which can be accomplished by either:
Solution:This error trips up new PostgreSQL users quite often. When you simply run psql from the command line it, by default, attempts to log you into a database with the same name as your current Unix user name. In this case that is 'root', but it could be 'postgres', or 'bob'.
If you are setting up your database for the first time, you will need to become the PostgreSQL user ( typically 'postgres' ) which can be accomplished by either:
- logging in as that user
- su'ing to root and as root su'ing to the postgres user
Comments
Post a Comment