Connecting to Database

Author Message

Fraser Hore

Thursday 04 December 2003 7:23:31 am

I am unable to get past the connect to database screen in the setup wizard. Could someone please share some known solutions to this problem.

i.e. is there a default password i'm missing?

Cheers,

Fraser

Kåre Køhler Høvik

Thursday 04 December 2003 8:35:00 am

Hi

Are you using mysql or postgresql ?
What platform are you on (linux, ms, etc.) ?
Are you trying to install from the .tar.gz, or one of the complete installers ?
Which version are you trying (3.2-3 or 3.3b1) ?

--
Kåre Høvik

Kåre Høvik

Carilda Thomas

Thursday 04 December 2003 11:30:19 am

Hi, all.
I am still struggling with the install myself, but have discovered the following:

The following is for PostgreSQL: (I make some guesses about mysql further down.)

The default startup for postmaster is to only activate the Unix socket for local connections. It will not open its port unless you start it with the -i option.

If you have not started with the -i option but try to use the "host=xxx" name=value pair, the connection will fail because that implies a socket connection (even if the host is specified as localhost).

So, the quick fix is to restart your postmaster with a -i option.

For security reasons, you may not want to do this. The dirty fix in this case is to go down into the directory <ezpublish-root>/lib/ezdb/classes and edit (carefully) the ezpostgresqldb.php file. Find the instances of pg_pconnect and pg_connect (there are two of each, one initial, and one in a retry loop). Comment them out (with notations - I am obsessive) and replace the connect string with "dbname=<whatever>". This assumes you have trust set for local connections in your pg_hba.conf file. If you don't know what this means or don't have access, bear with me. If that doesn't work, you have some other setup and may have to use the string "dbname=<whatever> user=<some valid user> password=<password>".

The above is a serious kludge and should not propagate, but will do for a q-and-d setup. The setup wizard, the manual instructions, and the setup file (haven't chased this one down yet) should be modified to distinguish a port-enabled db from a socket-only db . This could be done by running some basic connection tests within the setup program in the manner that a build configure shell does to create Makefile options.

For mysql (and I'm just guessing here), you are probably having some trouble with your grants.

Carilda

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.