By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

The "first day" with PostgreSQL and trouble with this

P: 4
Hi all,

i have a sql scripts and i need to make new database based on this scripts but i dont know how, because this ist my "first meet" with this PostgreSQL. I need that for project to school, and i really need your help. Is something like "how to" manual?

thx a lot.
Jan 10 '08 #1
Share this Question
Share on Google+
6 Replies


Expert 100+
P: 700
I guess there is a query creating database in the script, co you can simply do

psql < your_script

from a command line
Jan 10 '08 #2

P: 4
What exactly i need to run PostgreSQL on Win XP?
Because I installed the package from http://www.postgresql.org/ (postgresql-8.2.6-1.zip), but if I put the command "createdb test" to command prompt, then i must to give password and next i have error - something like this:

it`s impossible to make a connect with db postgres: FATAL: password authentication failed for user "some user"

thx for help
Jan 10 '08 #3

Expert 100+
P: 700
What exactly i need to run PostgreSQL on Win XP?
Because I installed the package from http://www.postgresql.org/ (postgresql-8.2.6-1.zip), but if I put the command "createdb test" to command prompt, then i must to give password and next i have error - something like this:

it`s impossible to make a connect with db postgres: FATAL: password authentication failed for user "some user"

thx for help
I do not use postgres under WinXp but try like this
createdb -U postgres test
tell me if it works. If not find a file pg_hba.conf and show it here (show only rows not begging with # )
Jan 10 '08 #4

P: 4
Ou thx, it works.

If I put the command with the flags "... -U postgres test" than I created new database without the problems.
Jan 10 '08 #5

P: 4
hmm ...

i try to put command "psql -U testuser -W testDB", i see this same error: psql: FATAL: pasword authentication failed for user "my user" ...

i really dont know where ist the catch with authentication.
Jan 10 '08 #6

Expert 100+
P: 700
hmm ...

i try to put command "psql -U testuser -W testDB", i see this same error: psql: FATAL: pasword authentication failed for user "my user" ...

i really dont know where ist the catch with authentication.
First of all if you want ro create user with password you should do
createuser -P username
Then you should change the pg_hba file, and put password authentication or trust authentication. It's hard to describe it here, just look at postgresql.org for more specific description, or describe what you want to achieve, and I will try to give you a solution.
Jan 10 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.