Mailinglist Archive: opensuse (4288 mails)
| < Previous | Next > |
Re: [SLE] How can I use PostgreSQL?
- From: Alexander Klayman <aklayman@xxxxxxxxxxxxxx>
- Date: Thu, 16 May 2002 22:46:07 -0400
- Message-id: <200205162246.07831.aklayman@xxxxxxxxxxxxxx>
I have been batteling with the same problem. I got psql working, but pgaccess
still can't connect. Making changes to postgresql.conf to allow postmaster
to listen on tcpip and setting the port to 5432 does not seem to have the
desired effect. If someone did get it to work or knows what the problem is,
please let us know.
On Thursday 16 May 2002 19:57, Tor Sigurdsson wrote:
> On Thu, 2002-05-16 at 16:26, Alberto García Fumero wrote:
> > Hi y'all!
> > I have just installed PostgreSQL on this SuSE 7.3. But I can not use it.
> > As I installed insung YAST2, I assume that the right variables are set
> > correctly. At least that was what YAST2 said ;-))
> > I admit I know almost nothing of it.
> > I tried to launch pgaccess as a simple user to begin with, but the error
> > (horror) message I get when I try to create a database is:
> > "Error TCL en la ejecutando pg_exec create database nameofdatabase
> > Is not a valid postgresql connection"
> > Trying to understand (I hope) the instruction from some papers I got, I
> > logged as user postgres and launched:
> > initdb --pglib=/usr/lib/pgsql --pgdata=/var/lib/pgsql
> >
> > and this time the error message was:
> >
> > initdb: invalid option: --pglib=/usr/lib/pgsql
> > Try 'initdb --help' for more information.
> >
> > So I forgot all about pglib and tried:
> >
> > postgres@fumero:/home/alberto> initdb --pgdata=/var/lib/pgsql
> > This database system will be initialized with username "postgres".
> > This user will own all the data files and must also own the server
> > process.
> >
> > initdb: The directory /var/lib/pgsql exists but is not empty.
> > If you want to create a new database system, either remove or empty
> > the directory /var/lib/pgsql or run initdb with
> > an argument other than /var/lib/pgsql.
>
> You used the correct parameters. As the pgdata directory is aleady
> populated, I assume that the base is already installed.
>
> Check for the postgresql status with:
>
> /etc/init.d/postgresql status
>
> If you get "running", then you are already running the database.
>
> The next step is to create users and databases for the users to use:
>
> postgres@fumero:/ > createuser alberto
> 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) n
> CREATE USER
> postgres@fumero:/ > exit
> alberto@fumero:~ > createdb alberto
> CREATE DATABASE
> alberto@fumero:~ > psql
> Welcome to psql, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help on internal slash commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> alberto=>
>
> Now your'e connected to the database 'alberto' as user 'alberto'.
>
> Further documentation on how to create tables, access your data,
> datatypes and query design etc can be found in Bruce Momjians excellent
> book 'PostgreSQL', which can be read at http://www.postgresql.org in the
> documentation section, and can be bought in dead-tree form, ISBN
> 0-201-70331-9
>
> -tosi
>
> > How should I interpret this?
> > TIA,
> > --
> > MSc. Alberto García Fumero
> > Centro de Información para la Educación
> > Ministerio de Educación
> > Usuario Linux No. 97 138
> > ¿Windows? No, gracias!
> >
> > --
> > To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
> > For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
> > Also check the archives at http://lists.suse.com
| < Previous | Next > |