Author Topic: AGAIN: DB Error: Could not connect to the database server  (Read 4830 times)

0 Members and 1 Guest are viewing this topic.

Offline horo

  • Newbie
  • *
  • Posts: 10
    • View Profile
AGAIN: DB Error: Could not connect to the database server
« on: February 08, 2006, 06:57:28 PM »
Auch ich bekommen den bekannten Fehler im Subject und komme auch nach dem Durchforsten dieses Forums nicht weiter.
I get the known error mentioned in the Subject and even after ploughing through this forum, I don't make any progress.

Im PHP error.log lese ich:

[07-Feb-2006 19:11:57] PHP Warning:  MySQL Connection Failed: Client does not support authentication protocol requested by server; consider upgrading MySQL client
 in ./includes/db_mysql.php on line 39

The offending function in db_mysql.php (part of)
  function Db($db_host, $db_user, $db_password = "", $db_name = "", $db_pconnect = 0) {
    $connect_handle = ($db_pconnect) ? "mysql_pconnect" : "mysql_connect";
    if (!$this->connection = $connect_handle($db_host, $db_user, $db_password)) {
      $this->error("Could not connect to the database server ($db_host, $db_user).", 1);

Ich benutze die MySQL Version (Console copy):

MySQL Version
C:\>mysql show version
mysql  Ver 14.12 Distrib 5.0.18, for Win32 (ia32)
Copyright (C) 2002 MySQL AB

Die PHP Version aus dem info.php:

PHP Version 4.0.4pl1
Windows NT 5.0 build 2195

Als Webserver benutze ich Xitami, das Ganze läufdt unter Win2K. CGI funktionieren, eigene kleinere PHP Scripts, REBOL Scribts, alles läuft ( http://horo.dyndns.org/index.html ).
I use the Xitami webserver, everything runs under Win2k. CGI work fine, my own small PHP scripts, REBOL scripts, everything works smoothly.

Der Zugriff für die Installation über localhost, usw. Datenbank erstellt, funktioniert von der MySQL Console aus. Provider bin ich selbst.
I did the installation as localhost, etc. a database was created, it works from the MySQL console. In this endavour, I'm my own provider.

Irgendwelche Vorschläge? Ich stehe an. Die Fehlermeldung, ich solle auf eine höhere Version von MySQL upgraden finde ich etwas lapidar - es ist die Neueste.
Any suggestions? I'm stuck. The error msg to upgrade MySQL seems a bit silly, it is the newest one.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: AGAIN: DB Error: Could not connect to the database server
« Reply #1 on: February 09, 2006, 12:24:55 AM »
Sorry for responce in english.
As far as I know If you installed pre-compilled PHP (not compilled from the source), then you need PHP v5.x in order to use it with MySQL v4/5
Either upgrade your PHP to the lattest version or downgrade MySQL to v3.x
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline horo

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: AGAIN: DB Error: Could not connect to the database server
« Reply #2 on: February 09, 2006, 06:05:58 PM »
Thanks for the fast reply v@no. I'll try to update to PHP5 and come back - hopefully with kudos for you.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: AGAIN: DB Error: Could not connect to the database server
« Reply #3 on: February 10, 2006, 01:24:06 AM »
oh...didnt see you had translation in english....next time use different colors or something ;)

Btw, if it still fails, you might want to consider enable MySQLi extension in php.ini and try this mod:
http://www.4homepages.de/forum/index.php?topic=8705.0
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline horo

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: AGAIN: DB Error: Could not connect to the database server
« Reply #4 on: February 10, 2006, 06:25:22 PM »
Sorry about the undifferentiated German/English. With your kind help, I'll get smarter each time. More important: after I made PHP5 work, the installaton proceeded flawless, swift and painless. THANKS A BUNDLE!