Advanced search  

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

Pages: [1]   Go Down

Author Topic: Fatal Error and Unable to connect to database  (Read 9443 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.02 seconds with 20 queries.