problem in connecting database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sravani1
    Banned
    New Member
    • Mar 2008
    • 10

    problem in connecting database

    I am new to the php. i wrote the code to connect to the database. I will use the following code.

    <?php
    $con = mysql_connect(" localhost","roo t","root");
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }

    // some code
    mysql_close($co n);
    ?>




    i run the code this error will occure. plz tell that problem.


    Warning: mysql_connect() : Client does not support authentication protocol requested by server; consider upgrading MySQL client in D:\php files\con2.php on line 2
    Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Have a look at this
    (this is probably more suited for the mysql forum)

    Comment

    Working...