coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: megaspaz on March 29, 2006, 08:12:17 PM

Title: coppermine trying to access database as a user that's different than what I set.
Post by: megaspaz on March 29, 2006, 08:12:17 PM
I can't get into my gallery because coppermine can't connect to the database:
Coppermine critical error:
Unable to connect to database !

MySQL said: Access denied for user 'root'@'localhost' (using password: NO)

But I didn't set the mysql user to be "root". in include/config.inc.php the contents are:

<?php
// Coppermine configuration file

// MySQL configuration
$CONFIG['dbserver'] =                         'localhost';        // Your database server
$CONFIG['dbuser'] =                         'sa';        // Your mysql username
$CONFIG['dbpass'] =                         'somepass';                // Your mysql password
$CONFIG['dbname'] =                         'somedb';        // Your mysql database name


// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] =                'cpg143_';
?>

Anybody know how to go about fixing this?

Thanks. :)

edit: coppermine was working fine until i restarted apache
Title: Re: coppermine trying to access database as a user that's different than what I
Post by: Joachim Müller on March 29, 2006, 09:53:14 PM
don't use the "sa" account for everyday actions, and especially not for coppermine.
Title: Re: coppermine trying to access database as a user that's different than what I set.
Post by: megaspaz on March 29, 2006, 10:06:13 PM
I think you may be mistaken in that the 'sa' account isn't the same 'sa' account that's setup in MSSQL. This is a mysql database and the 'sa' account is something I created. It's no different than any other mysql user that I would create. The question is, why is coppermine not trying to connect with the credentials I set up in install.php.

Thanks :)
Title: Re: coppermine trying to access database as a user that's different than what I set.
Post by: megaspaz on March 29, 2006, 11:59:04 PM
Problem solved. It' not enough to turn off safe_mode... I also needed to turn off sql.safe_mode. In httpd.conf, add these lines in the right directory directive or htaccess file:

Quotephp_admin_flag safe_mode off
  php_admin_flag sql.safe_mode off