The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Warning: mysql_connect(): Client does not support authentication protocol

Discussion in 'General Discussion' started by Secret Agent, Apr 8, 2005.

  1. Secret Agent

    Secret Agent Guest

    Hello there. I am trying to connect to a sql database. I made a small test script to test the connection. I am using the sample code that was given from cpanel.

    I keep getting the following warning:

    Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/canoesfo/public_html/test.php on line 10 I cannot connect to the database because: Client does not support authentication protocol requested by server; consider upgrading MySQL client


    What should I do? Where do I tweak the security settings for this type of thing?

    I saw only a few other threads somewhat similiar and the methods didn't work for me.

    /scripts/makecpphp
    /scripts/easyapache
    /scripts/updatenow
    /scripts/mysqlup --force

    I have MySQL 4.1.10a-standard
     
  2. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Add the line old-passwords under [mysqld] in /etc/my.cnf. Restart MySQL, and delete and remake the user for the database.
     
  3. Secret Agent

    Secret Agent Guest

    I already added that and restarted mysql, I'll try deleting / removing the user.

    Thank you.
     
  4. Octo

    Octo Registered
    PartnerNOC

    Joined:
    Oct 21, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
  5. shashank

    shashank Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    159
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    such an old thread ?
     
  6. Snowman30

    Snowman30 Well-Known Member
    PartnerNOC

    Joined:
    Apr 7, 2002
    Messages:
    681
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    It might be an old thread but ive just had it happen to me after doing a cpanel upgrade and apache recompile last night, and no i wasnt coming from some old version of cpanel and ive been runnign mysql 4.1 for months...
     
  7. xcopy

    xcopy Registered

    Joined:
    Jul 19, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    A solution

    Maybe you can use this solution:

    1) Execute this SQL code in PHPMyAdmin:

    SET PASSWORD FOR root@localhost = OLD_PASSWORD('newpassword')

    2) Include in my.cnf this line:

    #Use old password encryption method (needed for 4.0 and older clients).
    old_passwords

    Save the changes.

    4) Edit the archive "config.inc.php" in /usr/local/cpanel/3party/phpMyAdmin and add the new password in the line

    $cfg['Servers'][$i]['password'] = 'newpassword';

    5) Restart MySQL

    If you still have problems:

    6) Go to WHM and click in "MySQL"---->"Change User or Database Password"

    7) Search the USER of the DATABASE you want to use and write a new password for it.

    8) Restart MySQL

    Enjoy :)
     
  8. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    Did you recompile apache with the same settings? (system mysql versus php's mysql client?)
     
Loading...

Share This Page