Thread: Errors creating my first database
I have been trying to get started with PostgreSQL, and it hasn't been going well. I installed, ran initdb, but when I try to create a database with createdb I get an error that "username" does not exist. OK, so I try to use createuser to create the user name and I get a different, though equally frustrating, error. I have shut down my Linux box out of frustration so I can't tell you all the exact error, sorry. One of the errors I am getting is about a locking file that I don't have permissions for. Obviously I am doing something wrong here. I have read and re-read the Tutorial, User's Manual and Admin Manual, tried to follow the procedures in the manual, but no luck. Could someone please help me get started here. I am new to Linux and part of my frustration is that all the manuals assume an intermediate level of experience with Linux/UNIX. I don't have that and at this rate I can't see that I ever will. ------------------------------------------------ Get the award winning ISP, AT&T WorldNet Service http://download.att.net/webtag
kent.rigby@att.net writes: > I have shut down my Linux box out > of frustration so I can't tell you all the exact error, sorry. We'll really need to see the exact commands you issued and the exact responses you got to be able to offer much constructive help. Cut-and-paste from a terminal window is a real good way to illustrate such problems... regards, tom lane
Kent, You sound like I did a couple months ago. The book 'Pratical PostgreSQL' from O'Reilly Press really got me started on the right foot. Chapter 2 gives a detailed step-by-step procedure to installing and starting Postgres. Do a Google search to find it on-line, or better yet, buy the book. The other thing that I did was to acquire SuSE 7.3 Professional. By doing a detailed install and selecting PostgreSQL, it will do most of the work for you so that all that has to be done is: 1. change the postgres user password 2. run initdb 3. test your install 4. Test, test, test..... 5. Document, document, document.... Good luck, HTH, Troy --- kent.rigby@att.net wrote: > I have been trying to get started with PostgreSQL, > and > it hasn't been going > well. I installed, ran initdb, but when I try to > create > a database with > createdb I get an error that "username" does not > exist. > OK, so I try to use > createuser to create the user name and I get a > different, though equally > frustrating, error. I have shut down my Linux box > out > of frustration so I > can't tell you all the exact error, sorry. One of > the > errors I am getting > is about a locking file that I don't have > permissions > for. > > Obviously I am doing something wrong here. I have > read > and re-read the > Tutorial, User's Manual and Admin Manual, tried to > follow the procedures in > the manual, but no luck. > > Could someone please help me get started here. I am > new > to Linux and part > of my frustration is that all the manuals assume an > intermediate level of > experience with Linux/UNIX. I don't have that and > at > this rate I can't see > that I ever will. > > > > > > ------------------------------------------------ > Get the award winning ISP, AT&T WorldNet Service > http://download.att.net/webtag > > ---------------------------(end of > broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org ______________________________________________________________________ Find, Connect, Date! http://personals.yahoo.ca
When I run createdb I get the following error: psql: FATAL 1: User "my_user_name" does not exist createdb: database creation failed When I run createuser I get the following error: pgsql: FATAL 1: user "my_user_name" does not exist createuser: creation of user "new_user_name" failed in both cases "my_user_name" is the name of the unpriviliged user account under which I am currently logged in. "newa_user_name" is the name of the user I am trying to create (which just happens to be my current login name. PS I tried to create a database using PgAccess and I got this error: Tcl error executing pg_exec create database "database_name" is not a valid postgresql connection. I hope this helps. I am going to Barnes and Nobles right now to look for the Practical PostgreSQL book that Ugly Hippo suggested. Kent -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Monday, April 01, 2002 10:46 AM To: kent.rigby@att.net Cc: pgsql-novice@postgresql.org Subject: Re: [NOVICE] Errors creating my first database kent.rigby@att.net writes: > I have shut down my Linux box out > of frustration so I can't tell you all the exact error, sorry. We'll really need to see the exact commands you issued and the exact responses you got to be able to offer much constructive help. Cut-and-paste from a terminal window is a real good way to illustrate such problems... regards, tom lane
Hi, There's an easy fix for this: createdb -Upostgres (dbname) or createuser -Upostgres (new_user_name) It will then pop up asking for the password for the postgres user. The problem is you're running these commands as yourself, not as the postgres 'super-user'. Since postgres doesn't know anything about your user (yet), it can't verify your access. See how that goes. >When I run createdb I get the following error: >psql: FATAL 1: User "my_user_name" does not exist >createdb: database creation failed > >When I run createuser I get the following error: >pgsql: FATAL 1: user "my_user_name" does not exist >createuser: creation of user "new_user_name" failed > >in both cases "my_user_name" is the name of the unpriviliged user account >under which I am currently logged in. "newa_user_name" is the name of the >user I am trying to create (which just happens to be my current login name. > >PS I tried to create a database using PgAccess and I got this error: >Tcl error executing pg_exec create database "database_name" >is not a valid postgresql connection. > >I hope this helps. I am going to Barnes and Nobles right now to look for >the Practical PostgreSQL book that Ugly Hippo suggested. > >Kent > >-----Original Message----- >From: Tom Lane [mailto:tgl@sss.pgh.pa.us] >Sent: Monday, April 01, 2002 10:46 AM >To: kent.rigby@att.net >Cc: pgsql-novice@postgresql.org >Subject: Re: [NOVICE] Errors creating my first database > > >kent.rigby@att.net writes: > > I have shut down my Linux box out > > of frustration so I can't tell you all the exact error, sorry. > >We'll really need to see the exact commands you issued and the exact >responses you got to be able to offer much constructive help. > >Cut-and-paste from a terminal window is a real good way to illustrate >such problems... > > regards, tom lane > > >---------------------------(end of broadcast)--------------------------- >TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) ----------------- Chris Smith http://www.squiz.net/