[MySQL] Client does not support authentication protocol

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

    [MySQL] Client does not support authentication protocol

    Hi

    I just upgraded from MySQL 4.0.something to 4.1.1 (alpha).

    When I try to connect to MySQL in a PHP script, I get the following error:

    "mysql_connect( ): Client does not support authentication protocol
    requested by server; consider upgrading MySQL client in file.php on line
    130"

    I have not changed anything in my PHP configuration. I can connect to
    MySQL with the user/password used in PHP from the command line (with
    mysql.exe).

    This is with Windows XP Pro and PHP 4.3.3.

    Thanks.

  • Gordon Burditt

    #2
    Re: [MySQL] Client does not support authentication protocol

    >I just upgraded from MySQL 4.0.something to 4.1.1 (alpha).

    Did you set new passwords using MySQL 4.1.1?
    [color=blue]
    >When I try to connect to MySQL in a PHP script, I get the following error:
    >
    >"mysql_connect (): Client does not support authentication protocol
    >requested by server; consider upgrading MySQL client in file.php on line
    >130"
    >
    >I have not changed anything in my PHP configuration. I can connect to
    >MySQL with the user/password used in PHP from the command line (with
    >mysql.exe).[/color]

    If you created new passwords using MySQL 4.1.1, then unless you
    started the server with some option like "--old-passwords", the
    account you are trying to connect to CANNOT be accessed by clients
    older than 4.1.1 (maybe 4.1.0).

    If you kept the same mysql database (the user/privileges database)
    when you upgraded, it should still work. What does
    "use mysql; select length(password ) from user;"
    return? 16 is an old-style password. 41 is a new one.
    45 is some bastard version used only in 4.1.0, I think.

    See the MySQL 4.1.1 manual for details on this.

    Gordon L. Burditt

    Comment

    • yzzzzz

      #3
      Re: [MySQL] Client does not support authentication protocol

      Gordon Burditt wrote:[color=blue][color=green]
      >>I just upgraded from MySQL 4.0.something to 4.1.1 (alpha).[/color]
      > Did you set new passwords using MySQL 4.1.1?[/color]
      (yes)
      [color=blue][color=green]
      >>When I try to connect to MySQL in a PHP script, I get the following error:
      >>
      >>"mysql_connec t(): Client does not support authentication protocol
      >>requested by server; consider upgrading MySQL client in file.php on line
      >>130"
      >>
      >>I have not changed anything in my PHP configuration. I can connect to
      >>MySQL with the user/password used in PHP from the command line (with
      >>mysql.exe).[/color]
      >
      > If you created new passwords using MySQL 4.1.1, then unless you
      > started the server with some option like "--old-passwords", the
      > account you are trying to connect to CANNOT be accessed by clients
      > older than 4.1.1 (maybe 4.1.0).
      >
      > If you kept the same mysql database (the user/privileges database)
      > when you upgraded, it should still work. What does
      > "use mysql; select length(password ) from user;"
      > return? 16 is an old-style password. 41 is a new one.[/color]

      That's it! It returns 41. I had no idea the passwords had changed. So,
      is there any way to update the client binairies used by PHP (the
      libmySQL.dll file)? Or can I make PHP use my own mysql client binairies
      that are in my MySQL folder?

      If not, I will keep the old format, but how do I keep the same database?
      When I installed the new version of MySQL (in a different directory) I
      renamed the new (almost empty) data folder, and copied my old data
      folder there instead, but mysqld-nt wouldn't start...
      [color=blue]
      > See the MySQL 4.1.1 manual for details on this.[/color]

      Yes, I just read
      <http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Da tabase_Administ ration.html#Pas sword_hashing>

      Comment

      Working...