MySQL database giving errors. Not sure where to change db?

damboyer

Joined: 2004-12-03
Posts: 5
Posted: Sun, 2005-01-23 17:52

http://dontravels.existhost.com/gallery/main.php

Warning: mysql_pconnect(): Lost connection to MySQL server during query in /hsphere/local/home/damboyer/dontravels.existhost.com/gallery/lib/adodb/drivers/adodb-mysql.inc.php on line 354
Error (ERROR_STORAGE_FAILURE)

    * in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 233 (gallerystatus::error)
    * in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 181 (mysqldatabasestorage::_getconnection)
    * in modules/core/classes/GalleryStorage.class at line 212 (mysqldatabasestorage::init)
    * in modules/core/classes/Gallery.class at line 176 (gallerystorage::search)
    * in modules/core/classes/helpers/GalleryUserGroupHelper_medium.class at line 246 (gallery::search)
    * in modules/core/classes/GalleryCoreApi.class at line 1523 (galleryusergrouphelper_medium::fetchgroupsforuser)
    * in modules/core/classes/helpers/GalleryUserHelper_simple.class at line 89 (gallerycoreapi::fetchgroupsforuser)
    * in modules/core/classes/helpers/GalleryUserHelper_simple.class at line 57 (galleryuserhelper_simple::hasitempermission)
    * in modules/core/classes/GalleryCoreApi.class at line 322 (galleryuserhelper_simple::asserthasitempermission)
    * in modules/core/ShowItem.inc at line 81 (gallerycoreapi::asserthasitempermission)
    * in modules/core/classes/GalleryView.class at line 245 (showitemview::loadtemplate)
    * in main.php at line 281 (showitemview::doloadtemplate)
    * in main.php at line 47
    * in main.php at line 40


Warning: mysql_pconnect(): Lost connection to MySQL server during query in /hsphere/local/home/damboyer/dontravels.existhost.com/gallery/lib/adodb/drivers/adodb-mysql.inc.php on line 354
Error (ERROR_STORAGE_FAILURE)

    * in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 233 (gallerystatus::error)
    * in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 181 (mysqldatabasestorage::_getconnection)
    * in modules/core/classes/GalleryStorage.class at line 384 (mysqldatabasestorage::init)
    * in main.php at line 59 (gallerystorage::committransaction)
    * in main.php at line 40


Warning: mysql_pconnect(): Lost connection to MySQL server during query in /hsphere/local/home/damboyer/dontravels.existhost.com/gallery/lib/adodb/drivers/adodb-mysql.inc.php on line 354

Warning: mysql_pconnect(): Lost connection to MySQL server during query in /hsphere/local/home/damboyer/dontravels.existhost.com/gallery/lib/adodb/drivers/adodb-mysql.inc.php on line 354

I am not sure where to change the database user information. My hosting company was recently screwing around with MySQL updates and this broke the Gallery app. The blog still works but... photos are more fun. Thanks for any help.

Don

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2005-01-24 10:52

Hm. You're using persistent connections but it looks like the database is disconnecting them on you. I wonder if your hosting company is trying to restrict that..

Upgrade to the latest nightly snapshots and edit your config.php to set this:

$storeConfig['usePersistentConnections'] = false;

If you don't have that line, just add it right before this line:

$gallery->setConfig('storage.config', $storeConfig);

that should disable persistent connections and may resolve this problem.

 
damboyer

Joined: 2004-12-03
Posts: 5
Posted: Tue, 2005-01-25 12:08

I tried adding that line, but I still recieve the same error. What do you recommend for next steps? Thanks for your help.

Don

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2005-01-26 20:31

Did you upgrade to the latest nightly snapshot of G2?

 
damboyer

Joined: 2004-12-03
Posts: 5
Posted: Thu, 2005-01-27 08:33

I have been trying to upgrade to the latest nightly version. I downloaded the version I have on Sunday evening.

This is the error I am getting at Step 5 Database Setup:

Warning: mysql_connect(): Lost connection to MySQL server during query in /hsphere/local/home/damboyer/dontravels.existhost.com/gallery2/lib/adodb/drivers/adodb-mysql.inc.php on line 339
damboye_testgallery: Lost connection to MySQL server during query

At first I was using the exact same database as used in the previous install. Since that failed I created a new database. I know all of the parameters are identical to the intial install because I have copied them from the config.php file. I'm not sure what is going on...

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2005-01-27 18:08

Hm. We're not doing anything very special here. Our connection to the database is dying right at the point where we try to initiate it. My guess is that something is wrong with your database. Do other database apps work properly? Is there anything in the db error logs?