forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: heidurmaria on October 30, 2010, 01:49:48 am

Title: Fatal Error and Unable to connect to database
Post by: heidurmaria on October 30, 2010, 01:49:48 am
The other day my gallery stopped working and I got this message.

Quote
Coppermine 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.

Quote
While 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';
?>
Title: Re: Fatal Error and Unable to connect to database
Post by: Jeff Bailey on October 30, 2010, 02:27:32 am
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
Code: [Select]
$CONFIG['dbserver'] = 'mysql.website.com';  // Your database server
Title: Re: Fatal Error and Unable to connect to database
Post by: heidurmaria on October 30, 2010, 02:55:43 pm
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
Title: Re: Fatal Error and Unable to connect to database
Post by: Jeff Bailey on October 30, 2010, 06:38:17 pm
Should have noticed this before...
Code: [Select]
$CONFIG['TABLE_PREFIX'] = 'cpg14x';
doesn't your prefix have an underscore after it? It should look like
Code: [Select]
$CONFIG['TABLE_PREFIX'] = 'cpg14x_';
Title: Re: Fatal Error and Unable to connect to database
Post by: heidurmaria on October 31, 2010, 02:02:43 am
I've added the underscore but its still not working.

What is this table thing the error is talking about?
Title: Re: Fatal Error and Unable to connect to database
Post by: Jeff Bailey on October 31, 2010, 05:11:42 am
Quote
doesn'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.
Title: Re: Fatal Error and Unable to connect to database
Post by: heidurmaria on November 01, 2010, 01:17:49 am
There is nothing there.. so I guess I have to make some right? How do I do that?