CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Install yields only "DB Error: connect failed"
Pages: 1 [2]

Author Topic: Install yields only "DB Error: connect failed"  (Read 7159 times)

nnangeroni

  • I’m new here
  • *
  • Posts: 27
  • Karma: 2
  • CiviCRM version: 3.4.0
  • CMS version: Drupal 6.20
  • MySQL version: 5.5.x
  • PHP version: 5.3.x
Re: Install yields only "DB Error: connect failed"
November 05, 2009, 10:06:15 am
FINALLY GOT IT WORKING!!!!!!

I tried a fresh install from files unpacked on the server (finally figured out how to do that) and the installer ran to completion.  The completion page featured the message:

CiviCRM component files have been UPGRADED succesfully.
Please run the CiviCRM Database Upgrade Utility now. This utility will check your database and perform any needed upgrades.


BUT, when I tried to run the "upgrade utility" as requested, I still get the following error:

DB_DataObject Error: DB Error: connect failed

::sigh:: 

I tried running the civicrm component, and got the same error.  But after editing civicrm.settings.php under administration and under components, with the tcp() syntax added to the DSN, the component now runs. 

But the upgrade utility still doesn't run.  I'm concerned that I won't be able to upgrade this install.  I'll poke around some more...


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Install yields only "DB Error: connect failed"
November 05, 2009, 02:49:46 pm

might want to check here: http://forum.civicrm.org/index.php/board,12.0.html

hopefully we'll get a response on how that person fixed the issue

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

nnangeroni

  • I’m new here
  • *
  • Posts: 27
  • Karma: 2
  • CiviCRM version: 3.4.0
  • CMS version: Drupal 6.20
  • MySQL version: 5.5.x
  • PHP version: 5.3.x
Re: Install yields only "DB Error: connect failed"
November 05, 2009, 02:57:45 pm
Interestingly, I had to re-install after a botched database import, and was not able to get it to re-install, except by replacing every instance of CIVICRM_DSN in the installer files with the known good string that included the "tcp()" syntax.  So, I essentially hard-wired the database access string into the installer.  I think there were three different files where I had to make the substitution.

Let me know if you want more detail.

fedix

  • Guest
Re: Install yields only "DB Error: connect failed"
December 08, 2009, 03:19:36 am
I also have the DB connect fail error.  I wouldn't want to (or even know how to) fiddle with the .php files.  I'm a newbie and all my other MySQL connections are working fine within joomla.  

The possible solutions here didn't solv emy problems.

Any help PLEASE

After clicking install, it goes to a clean page with this error Cannot open mysql://root:xxxxxx@localhost/joomla?new_link=true: DB Error: connect failed
« Last Edit: December 08, 2009, 04:06:33 am by fedix »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Install yields only "DB Error: connect failed"
December 08, 2009, 08:02:20 am

your best bet might be to hire someone from http://civicrm.org/professional/

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

fedix

  • Guest
Re: Install yields only "DB Error: connect failed"
December 09, 2009, 06:56:24 am
I'm in South Africa.  At what price?

nnangeroni

  • I’m new here
  • *
  • Posts: 27
  • Karma: 2
  • CiviCRM version: 3.4.0
  • CMS version: Drupal 6.20
  • MySQL version: 5.5.x
  • PHP version: 5.3.x
Re: Install yields only "DB Error: connect failed"
March 02, 2010, 03:40:42 pm
I know it's been a long time since I replied to this topic, but I think an update is in order, as I ran into the SAME problem installing CiviCRM under Drupal on the same server.

Here's the fix:

in  ...modules/civicrm/install/civicrm.php

Replace

    $dsn = "mysql://{$config['mysql']['username']}:{$config['mysql']['password']}@{$config['mysql']['server']}/{$config['mysql']['database']}?new_link=true";

with

    $dsn = "mysql://{$config['mysql']['username']}:{$config['mysql']['password']}@tcp({$config['mysql']['server']})/{$config['mysql']['database']}?new_link=true";

Note the addition of "tcp(...)" encapsulating the server string.  This seemed necessary because my server required the string "localhost:/tmp/mysql5.sock" to access mysql.

Hope this helps somebody else....

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Install yields only "DB Error: connect failed"

This forum was archived on 2017-11-26.