Results 1 to 2 of 2

Thread: PHP MySQL connection error

  1. #1
    Join Date
    Feb 2006
    Posts
    4

    PHP MySQL connection error

    Hi,

    I thought I have successfully installed MySQL on my machine until this another error occur:

    Error: 1251 SQLSTATE: 08004 (ER_NOT_SUPPORTED_AUTH_MODE)
    Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client

    whenever I tried to run this script from PHP:

    <?php
    $link = mysql_connect('localhost', 'root', 'nic');
    if (!$link) {
    die('Could not connect: ' . mysql_error());
    }
    echo 'Connected successfully';
    mysql_close($link);
    ?>

    I hope somebody could help me on this, thnkx

  2. #2
    Join Date
    Apr 2006
    Posts
    74
    I found this on the mysql docs:
    link

    If you have PHP 5 installed, it looks like you could try using mysqli_connect() as supposed to mysql_connect(), although this is what I'm getting from the docs page - I've never encountered this error myself

Similar Threads

  1. PHP and MySQL Error handling problems
    By LithMaster in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 23 Oct 2005, 05:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •