Author Topic: Failed to connect to database... !?!  (Read 4864 times)

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Failed to connect to database... !?!
« on: May 21, 2009, 09:54:42 am »
Just started getting this message this morning.  Site was up and running last night.
Any ideas on where to look to find out what is going wrong, or how to fix this?
Thanks.

config.php
Code: [Select]
<?php
  define
('SEED''xxxxxxxx_zzzzzzz7012882084');
  
define('SEED''xxxxxxxx_zzzzzzz1099105472');
  
define('SEED''xxxxxxxx_zzzzzzz1065726876');
  
define('DB_ADAPTER''mysql'); 
  
define('DB_HOST''localhost'); 
  
define('DB_USER''xxxxxxxx_zzzzzzz'); 
  
define('DB_PASS''yyyyyyyyy'); 
  
define('DB_NAME''xxxxxxxx_OG1'); 
  
define('DB_PERSIST'true); 
  
define('TABLE_PREFIX''og_'); 
  
define('ROOT_URL''http://qqqqqqq.net/collab'); 
  
define('DEFAULT_LOCALIZATION''en_us'); 
  
define('DEBUG'true); 
  
define('PRODUCT_VERSION''0.9'); 
  
define('DB_CHARSET''utf8'); 
  return 
true;
?>


« Last Edit: May 21, 2009, 09:56:43 am by Number8 »

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: Failed to connect to database... !?!
« Reply #1 on: May 21, 2009, 12:27:45 pm »
Is mysql server running?
maybe it hanged for some reason...

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Failed to connect to database... !?!
« Reply #2 on: May 21, 2009, 12:58:37 pm »
Other OG installations on the same host are running as expected.

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: Failed to connect to database... !?!
« Reply #3 on: May 21, 2009, 01:15:44 pm »
Is there any error description in 'cache/log.php' ?

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Failed to connect to database... !?!
« Reply #4 on: May 21, 2009, 01:26:23 pm »
There is no cache/log.php.

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Failed to connect to database... !?!
« Reply #5 on: May 22, 2009, 09:04:03 am »
What are these:
Code: [Select]
define('SEED', 'xxxxxxxx_zzzzzzz7012882084');
  define('SEED', 'xxxxxxxx_zzzzzzz1099105472');
  define('SEED', 'xxxxxxxx_zzzzzzz1065726876');
Can they be removed?

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: Failed to connect to database... !?!
« Reply #6 on: May 22, 2009, 09:51:32 am »
you can remove the first two lines.

Number8

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
Re: Failed to connect to database... !?!
« Reply #7 on: May 22, 2009, 10:15:54 am »
I don't know what went wrong, but my site is back in business.

Steps:
- Uploaded a fresh OG to a new dir on the server
- created a new user for the existing db
- manually edited the config.php to point to the existing db using the new username

... and OG seems to be working as before.
(Including the problem with the Tags panel, described elsewhere.)

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: Failed to connect to database... !?!
« Reply #8 on: May 22, 2009, 10:36:22 am »
Thats a weird behavior...

by the way, don't forget to copy the folder 'upload' to the new installation, to keep the uploaded files.

fcoauga

  • Jr. Member
  • **
  • Posts: 51
  • www.augadaterra.org
    • View Profile
    • Auga da Terra
Re: Failed to connect to database... !?!
« Reply #9 on: July 06, 2009, 06:44:24 pm »
you can remove the first two lines.

Why not all config.php files have this line?

-----
Testing Opengoo:
 external server with PHP 5.1.6 & MySQL 5.0.45
 locally server with PHP 5.2.0 & MySQL 5.0.27
Viewed with Mozilla 3.0.1 & Opera 9.60