Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Fatal Error and Unable to connect to database  (Read 8519 times)

0 Members and 1 Guest are viewing this topic.

heidurmaria

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Fatal Error and Unable to connect to database
« 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';
?>
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Fatal Error and Unable to connect to database
« Reply #1 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
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

heidurmaria

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal Error and Unable to connect to database
« Reply #2 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
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Fatal Error and Unable to connect to database
« Reply #3 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_';
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

heidurmaria

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal Error and Unable to connect to database
« Reply #4 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?
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Fatal Error and Unable to connect to database
« Reply #5 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.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

heidurmaria

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Fatal Error and Unable to connect to database
« Reply #6 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?
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 19 queries.