Connection PHP4 <> Mysql ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Klaus Hansen

    Connection PHP4 <> Mysql ?

    Hi all

    Using Windows XP, PHP4.3.11 and Mysql 4.1.

    Im a newbie to PHP and Mysql.
    Im trying to connect to the database with this script:

    <?php
    //list_db.php

    $link_id = mysql_connect(" localhost", "phpuser", "phppass");
    $result = mysql_list_dbs( $link_id);
    $num_rows = mysql_num_rows( $result);

    while($db_data = mysql_fetch_row ($result)) {
    echo $db_data[0]. "<BR>";
    $result2 = mysql_list_tabl es($db_data[0]);
    $num_rows2 = mysql_num_rows( $result2);
    while($table_da ta = mysql_fetch_row ($result2)) echo "--" .
    $table_data[0]. "<BR>";
    echo "==> $num_rows2 table(s) in " . $db_data[0] . "<P>";
    }
    ?>
    But it gives me this error:Warning: mysql_connect() : Client does not support
    authentication protocol requested by server; consider upgrading MySQL client
    in c:\inetpub\wwwr oot\PHP4info.ph p on line 5Warning: mysql_list_dbs( ):
    supplied argument is not a valid MySQL-Link resource in
    c:\inetpub\wwwr oot\PHP4info.ph p on line 6Warning: mysql_num_rows( ): supplied
    argument is not a valid MySQL result resource in
    c:\inetpub\wwwr oot\PHP4info.ph p on line 7Warning: mysql_fetch_row ():
    supplied argument is not a valid MySQL result resource in
    c:\inetpub\wwwr oot\PHP4info.ph p on line 9What did I do wrong ?The database
    is running well.Best regardsKlaus Hansen


  • Anonymous

    #2
    Re: Connection PHP4 &lt;&gt; Mysql ?

    Klaus Hansen wrote:
    [color=blue]
    > Im a newbie to PHP and Mysql.
    > Im trying to connect to the database with this script:[/color]
    [...][color=blue]
    > But it gives me this error:Warning: mysql_connect() : Client does not support
    > authentication protocol requested by server; consider upgrading MySQL client[/color]
    [color=blue]
    > What did I do wrong ?[/color]

    This should be an FAQ here. ;-)

    Use the --old-passwords option for the MySQL server. Check the MySQL
    webpage for details.


    Comment

    • bebbet

      #3
      Re: Connection PHP4 &lt;&gt; Mysql ?

      your mysql module is for other versions not for 5, look for mysql module for
      version 5
      [color=blue]
      >Client does not support[/color]
      authentication protocol requested by server; consider upgrading MySQL client


      --
      bebbet.kicks-ass.net
      up/up
      1024
      status: http://bebbet.kicks-ass.net/aa1/


      Comment

      • Craft

        #4
        Re: Connection PHP4 &lt;&gt; Mysql ?

        or since your hosting a webserver on your pc and using xp and want to
        have php, cgi, mysql, and more then i suggest you download this and it
        comes with everything you need just click click and its done
        installed..



        comes with PHP5 and MYSQL5 so good luck..

        Comment

        Working...