Installation's a little bit different from mysql, but with a bit of Googling, there are some pretty good instructions out there that makes things clearer. Subsequently after installation, there may be two error messages to take note of, which you may encounter after the install process:
psql: FATAL: user "vincent" does not existIf you're not running as user
'postgres'
, this error indicates that the user (in my case 'vincent'
) does not exist in the database. Upon installation, postgres only allow the user 'postgres'
to access the database by default, so it's necessary have the right user profile to make configuration changes. This is done by invoking 'su'
(or 'sudo'
for some users) into 'postgres'
and invoke the 'createuser'
command:% createuserThe rights allow users to create databases, and to add new users to the database, which on a standalone machine that I have, it's probably ok to have
Enter name of user to add: vincent
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y
'y'
for both.You're not done with the process yet if you haven't created your database for access, and if you executed
'psql'
again, the following error props up:psql: FATAL: database "vincent" does not existThis is relatively easy to fix. Since you've already have database creation access, just by issuing
'createdb'
will initialize your database for use.% createdbTime to start creating and populating tables from here!
CREATE DATABASE
0 comments:
Post a Comment