coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: rocky2889 on January 31, 2005, 09:02:25 AM

Title: Forgot Mysql Password
Post by: rocky2889 on January 31, 2005, 09:02:25 AM
I have backup database and restore in another host. I forgot the password to the database. I got this error when restore the database when I access the site. Is there anyway to recover the password?

Thanks

Rocky

Coppermine critical error:
Unable to connect to database !

MySQL said: Access denied for user: 'lamfoto2_copp1@localhost' (Using password: YES)

Title: Re: Forgot Mysql Password
Post by: Aditya Mooley on January 31, 2005, 09:52:32 AM
Open config.inc.php in "include" folder and check whether the value of the variable $CONFIG['dbpass'] is your lost password.
If no, contact your web host.
Title: Re: Forgot Mysql Password
Post by: OmegaGOD on January 31, 2005, 11:09:04 AM
If your using cPanel and Fantastico and your web hosting provider has MD5 password encryption turned on then the entry attributed to the variable $CONFIG['dbpass'] will be encrypted. There is a fix though. Using Fantastico, create a second installation of CPG and enter the password you want to use during the installation stage. DO NOT install over your current installation. Put the second installation in a different location. Next open config.inc.php in "include" folder from the new installation of CPG you just did. Copy the variable entry for $CONFIG['dbpass'] from the new installation to the original installation. Then simply delete the second installation of CPG. [DONE]

or if you have shell access you can simply use the crypt command with your password to get the MD5 entry.
Title: Re: Forgot Mysql Password
Post by: rocky2889 on January 31, 2005, 04:00:15 PM
Thanks for your help.

Work Perfect

Rocky