Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Unable to connect to database! MySQL said: Access denied for user  (Read 4186 times)

0 Members and 1 Guest are viewing this topic.

matheso

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 91

Two days ago I changed my MySQL database password that Coppermine was connecting to, and this produced the error seen here: http://taskbasket.net/gallery/

 So then I changed the password value in the dbconnect.php file and re-uploaded,refreshed and still didn't work. I've changed the password back to the original and no change. I've read the other threads with similar issue but they're dated 2008 and only mention to change the file include/config.inc.php .. but this doesn't exist in 1.5 !

Why can't Coppermine connect even though settings are correct?? Thank you




Logged

Krys

  • Translator
  • Coppermine newbie
  • **
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 15
Re: Unable to connect to database! MySQL said: Access denied for user
« Reply #1 on: January 09, 2015, 06:27:38 pm »

Hello,

The include/config.inc.php file does exist in Coppermine 1.5. However, I can't find the dbconnect.php file in my installation (which is using the latest 1.5.34 release). How did you install your Coppermine?
Logged

matheso

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 91
Re: Unable to connect to database! MySQL said: Access denied for user
« Reply #2 on: January 10, 2015, 01:20:10 am »

I followed the 10-step installation process as defined by the docs. I didn't know there were other ways..

What can I do??
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Unable to connect to database! MySQL said: Access denied for user
« Reply #3 on: January 10, 2015, 08:47:17 am »

gallery/incude/config.inc.php:

Code: [Select]
<?php
// Coppermine configuration file
// MySQL configuration
$CONFIG['dbserver'] =                         'localhost';        // Your database server
$CONFIG['dbuser'] =                         ' ';        // Your mysql username
$CONFIG['dbpass'] =                         ' ';                // Your mysql password
$CONFIG['dbname'] =                         ' ';        // Your mysql database name


// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] =                'cpg15x_';

FOR dbuser you use the same username you use when you login in your host control panel.
Same for pass.
dbname - the database you use for coppemine when you install it.

In your host Cpanel you have phpMyAdmin.

I post it in the french forum attachment, that should help you: http://forum.coppermine-gallery.net/index.php/topic,77958.0.html.

Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Unable to connect to database! MySQL said: Access denied for user
« Reply #4 on: January 10, 2015, 08:56:04 am »

Like Krys said, there is no dbconnect.php.
To change pasword to a database you use MySql databases button (tool) in you host Cpanel.
Once you change the password to coppermine database, you go to /incude/config.inc.php and change the password even there.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Unable to connect to database! MySQL said: Access denied for user
« Reply #5 on: January 10, 2015, 11:19:47 am »

The file include/config.inc.php is generated by the installer. The other file was never used to store the database connection info since I use Coppermine (over 10 years now), if I remember correctly. So you need to enter valid data to include/config.inc.php.
Logged

matheso

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 91
Re: Unable to connect to database! MySQL said: Access denied for user
« Reply #6 on: January 10, 2015, 02:40:20 pm »

Thanks guys! It's solved now, I created config.ing.php using the code given above. As always, very helpful support! Take care
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.