MySQL Database Connection Error MySQL Database Connection Error
 

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

MySQL Database Connection Error

Started by St. Anger, September 23, 2010, 10:06:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

St. Anger

About a week ago my website was hacked all my files deleted. The CPG database was restored, as were the images in the albums directory. Everything else I don't have, however.

I decided to upload the CPG 1.5 files and perform the upgrade (my previous CPG version was 4.2.6 I think). Anyway, I get this error when attempting to access the upgrade page:

QuoteCoppermine critical error:
Unable to connect to database !

MySQL said: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

However, I've checked the database connection information and everything is correct. What should I do?

My gallery URL is http://www.metcoverart.com/gallery/

Thanks for any help

phill104

Speak to your host as it is almost certainly a hosting problem. Googling '/var/run/mysqld/mysqld.sock' brings up loads of answers as to what may have happened.
It is a mistake to think you can solve any major problems just with potatoes.

St. Anger

I asked my host about it and the support tech restarted MySQL, tested logging into phpMyAdmin, and accessing MySQL from the web server. All worked fine. He suggested extra spaces in the config.inc.php file may be causing problems, so I deleted extra spaces and reuploaded the config file. Now I get a different error:

QuoteCoppermine critical error:
The group table does not contain the Anonymous group !

St. Anger

^ That's when accessing the CPG 1.5 upgrade script. If I try to access any other pages I get a "Fatal Error" with a blank message.

By the way, there is no Anonymous user group because my gallery was bridged with my IPB forum, so it uses the forum member groups.

Αndré

You can manually add that group by performing that query in phpMyAdmin:
INSERT INTO CPG_usergroups VALUES (3, 'Anonymous', 0, 0, 1, 0, 0, 0, 0, 1, 1, 3);

Don't forget to adjust the table prefix 'CPG_'.

St. Anger

Thank you for your help :)

I ran the query and added the group, and I then checked the rows to make sure it was there. But, when I ran update.php I got the same error, and after checking the database the Anonymous user group was no longer there.  I tried adding it again and running update.php again but got the same problem, like it's deleting that group.

Jeff Bailey

You can't run update.php without being logged in.
which is what I assume your doing since I get the same error when I view it.
Quote
Coppermine critical error:
The group table does not contain the Anonymous group !

Go to your phpMyAdmin and enable debug mode and fix the Fatal Error before trying to get update.php to work.
http://documentation.coppermine-gallery.net/en/errors.htm#errors_debug_mode_manual
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Αndré

Since cpg1.5.x you cannot run update.php without administration privileges. I assume you haven't replaced all files properly.