Fatal Error and Unable to connect to database Fatal Error and Unable to connect to database
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Fatal Error and Unable to connect to database

Started by heidurmaria, October 30, 2010, 01:49:48 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

heidurmaria

The other day my gallery stopped working and I got this message.

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)

I emailed the host and have been fighting with them for a few days now and they say I need to check with coppermine for the problem. They said they noticed the confic file was empty so I tried filling in all the mysql info there. But then i got this error message.

QuoteWhile executing query "SELECT * FROM cpg14xconfig" on 0
mySQL error: Table 'taylorgallery2.cpg14xconfig' doesn't exist

I don't know if Im filling in the page wrong or what but I just don't know what to do anymore! This is driving me insane. Is there anyway I can get help?

This is what I filled into the page by the way. Is it correct?

Quote<?php
// Coppermine configuration file

// MySQL configuration
$CONFIG['dbserver'] =                         'mysql.website.com';        // Your database server
$CONFIG['dbuser'] =                         'myusername';        // Your mysql username
$CONFIG['dbpass'] =                         'mypassword';                // Your mysql password
$CONFIG['dbname'] =                         'mydatabase';        // Your mysql database name


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

Jeff Bailey

Please post a link. http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616


That is the right place.

try localhost instead of mysql.website.com at
$CONFIG['dbserver'] = 'mysql.website.com';  // Your database server
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

heidurmaria

Sorry, completely forgot about the link. http://www.t-swift.com/pictures

I'm with dreamhost and they say localhost doesn't work. I need to put the mysql.website.com

Jeff Bailey

Should have noticed this before...
$CONFIG['TABLE_PREFIX'] = 'cpg14x';

doesn't your prefix have an underscore after it? It should look like
$CONFIG['TABLE_PREFIX'] = 'cpg14x_';
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

heidurmaria

I've added the underscore but its still not working.

What is this table thing the error is talking about?

Jeff Bailey

Quotedoesn't exist
It says it doesn't exist. That's why I thought it was the prefix.

Can you attach an image of your phpmyadmin (or similar tool) showing your database with the tables.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

heidurmaria

There is nothing there.. so I guess I have to make some right? How do I do that?