Unable to connect to database ! Unable to connect to database !
 

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

Main Menu

Unable to connect to database !

Started by ungodlyhour, December 19, 2020, 08:30:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ungodlyhour

Coppermine critical error:
Unable to connect to database !

MySQLi said: :

----


I was backing up and copying files over to a new install and got this message.

Here is my website: https://cxhnow.com/cpg/

Can't access admin panel or anything.

Any advice?

phill104

That means the details in your include/config.inc.php file are incorrect. You will need to edit that to refect the correct database connection details
It is a mistake to think you can solve any major problems just with potatoes.

ungodlyhour

Thanks for replying  :)

I was able to change the information in that file, and now I have received this Fatal Error:

While executing query 'SELECT name, value FROM cpgtr_config' in include/init.inc.php on line 176

database error: 1146 : Table 'cxhnowsu_cpg20.cpgtr_config' doesn't exist

phill104

Have you copied over the database and then run update.php
It is a mistake to think you can solve any major problems just with potatoes.

ungodlyhour

Unfortunately I am not well-versed with this kind of stuff. PHP is something I am brand new to, so I have no idea how to do the things you mentioned. Since I am below a beginner, should I just leave well enough alone?

phill104

It is not complicated. There is no coding to do.

Just to get things straight, you were moving your gallery to a different host?

What steps have you done so far?

It is a mistake to think you can solve any major problems just with potatoes.

ungodlyhour

Not to a different host no, but instead to a new install (same host).

So far I copied and pasted the content from the /gallery Cpg install over to /cpg. Everything seemed to be in working order so I deleted /gallery as intended and broke something along the way.

ron4mac

If you place the file manager from here in the root of your site, I will see if I can straighten things out for you.

ungodlyhour

I was able to install it into public_html!

ron4mac

There were no tables in that database prefixed with cpgtr_. There were CPG tables prefixed with cpgg5_. I changed the prefix in the settings for /cpg/ and it doesn't fail now but, as you can see, those tables are for an empty CPG install. You may need to PM me your admin credentials for databases so I can see them all.

ungodlyhour

Okay I will do so now. Thank you so much for helping me!

ron4mac

It would seem that you used Softaculous to start your original CPG installation. When you used Softaculous to delete that installation, it also deleted the database for your Coppermine Gallery. Unless there is a database backup somewhere, everything that defines your albums and where the pictures in them are located ... is gone.

ungodlyhour

Thanks for checking. I think I found a backup through CPanel. Do I just unzip it and upload the contents to public_html/cpg ?

ungodlyhour

Quote from: ungodlyhour on December 21, 2020, 05:25:43 AM
Thanks for checking. I think I found a backup through CPanel. Do I just unzip it and upload the contents to public_html/cpg ?

I forgot to add that it's an SQL Source File.

ron4mac

I looked via your cPanel and didn't find a backup. I'll look again. But you can upload that file (zipped) to /cpg so I can see whether it will be correct.

ron4mac

Quote from: ron4mac on December 21, 2020, 01:31:40 PM
I looked via your cPanel and didn't find a backup. I'll look again.
The only offering from your cPanel is to download a 'backup' of the current database(s). I'm afraid your original CPG database is gone.