simple installation problem in windows system

Started by Long Cuialmost 18 years ago5 messagesgeneral
Jump to latest
#1Long Cui
choilon2000@gmail.com

I install PostgreSQL 8.3.3 in Windows XP, and set Path environment viarable
to C:\Program Files\PostgreSQL\8.3\bin, when I enter "create database mydb;"
it successed, however when "createdb mydb;" told me syntax error. Dose the
Path set wrong or I need to set other viarables?

In reply to: Long Cui (#1)
Re: simple installation problem in windows system

On 03/07/2008 14:40, Long Cui wrote:

I install PostgreSQL 8.3.3 in Windows XP, and set Path environment
viarable to C:\Program Files\PostgreSQL\8.3\bin, when I enter "create
database mydb;" it successed, however when "createdb mydb;" told me
syntax error. Dose the Path set wrong or I need to set other viarables?

It sounds as if you're issuing the commands from within psql - hence the
standard SQL "create database...." works, but "createdb.." won't.

createdb is just a wrapper program that sends a "create database..."
command to the server, so you need to run it from the Windows command-line.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

#3Long Cui
choilon2000@gmail.com
In reply to: Raymond O'Donnell (#2)
Re: simple installation problem in windows system

Many thanks
Now I enter c:\Program Files\PostgreSQL\8.3\bin\createdb mydb;
PG asks me password
Is the password as superadmin's password or postgre's password what I set
when postgresql installed in windows
I try both, but does not work" user administrator password fail"
so How to log on as superadmin.

long

On Thu, Jul 3, 2008 at 11:58 PM, Raymond O'Donnell <rod@iol.ie> wrote:

Show quoted text

On 03/07/2008 14:40, Long Cui wrote:

I install PostgreSQL 8.3.3 in Windows XP, and set Path environment
viarable to C:\Program Files\PostgreSQL\8.3\bin, when I enter "create
database mydb;" it successed, however when "createdb mydb;" told me syntax
error. Dose the Path set wrong or I need to set other viarables?

It sounds as if you're issuing the commands from within psql - hence the
standard SQL "create database...." works, but "createdb.." won't.

createdb is just a wrapper program that sends a "create database..."
command to the server, so you need to run it from the Windows command-line.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In reply to: Long Cui (#3)
Re: simple installation problem in windows system

On 04/07/2008 15:03, Long Cui wrote:

Now I enter c:\Program Files\PostgreSQL\8.3\bin\createdb mydb;
PG asks me password
Is the password as superadmin's password or postgre's password what I
set when postgresql installed in windows
I try both, but does not work" user administrator password fail"
so How to log on as superadmin.

A lot of this basic stuff is pretty accessible in the documentation -
have you read up on it there?

Having said that, what you need to do is use the -U option to specify
the Postgres user to use for the connection; if you don't, Postgres will
try to authenticate you as the Windows account under which you're logged
in. Look it up in the docs.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In reply to: Raymond O'Donnell (#4)
Re: simple installation problem in windows system

On 04/07/2008 15:36, Raymond O'Donnell wrote:

Having said that, what you need to do is use the -U option to specify
the Postgres user to use for the connection; if you don't, Postgres will
try to authenticate you as the Windows account under which you're logged
in. Look it up in the docs.

....or try createdb --help for a list of options.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------