[horde] Database connection failing at login

Dan M dan at trinetsolutions.com
Thu Dec 29 16:00:00 PST 2005


I'm running Horde (v 2.43.2.9 2003/01/03) and Imp (v 2.58.2.6 
2003/01/18) on FreeBSD 4.9. This package was installed by a previous 
admin, and I'm trying to troubleshoot it, as it's stopped working. I'm 
posting this here rather than the Imp list as I get the problem when I 
try to log in to (baseURL)/horde.

When I try to log in I fill in the user name and password fields and hit 
"Log in". I am then presented with an error message reading :
"*A fatal error has occurred:*
DB Error: connect failed
[line 114 of /usr/local/www/horde/lib/Prefs/sql.php]
Details have been logged for the administrator."

In horde.log I see:
Dec 29 15:29:29 HORDE [emergency] [imp] DB Error: connect failed:  
[nativecode=Client does not support authentication protocol requested by 
server; consider upgrading MySQL client] ** Array [on line 114 of 
"/usr/local/www/horde/lib/Prefs/sql.php"]
I've checked that I'm using MySQL 4.1.16. I wrote a little php script to 
verify that I can connect to mysql through php:
<?php

$link = mysql_connect('localhost', 'hordeuser', '<MyHordePassword>') or 
die('Error connect: ' . mysql_error());
echo "Connected ok\n";
mysql_select_db('horde') or die('Error select db: ' . mysql_error());

$q = 'SELECT * FROM horde_users';
$result = mysql_query($q) or die('Query failed: ' + mysql_error());
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
  foreach ($line as $col_value) {
      echo "$col_value\n";
  }
  echo "\n";
}

// Free resultset
mysql_free_result($result);
mysql_close($link);

?>
and it connects just fine.

I checked the mailing list archives, and that's where I found that I 
should check for a supported version of MySQL and check that to correct 
MySQL libraries are compiled in to php. The fact that the test script 
works makes me believe that it does. Pointers to a likely cause of this 
error message?

-- 
Daniel Mahoney
Trinet Internet Solutions, Inc. - (949)442-8900
108 Discovery, Irvine, CA  92618
Fax - (949) 442-8905


More information about the horde mailing list