Client does not support authentication protocol requested by server请看Mysql的文档,中间有说明MYSQL 帮助:A.2.3 Client does not support authentication protocol
MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients. If you upgrade the server to 4.1, attempts to connect to it with an older client may fail with the following message:shell> mysqlClient does not support authentication protocol requestedby server; consider upgrading MySQL clientTo solve this problem, you should use one of the following approaches:
Upgrade all client programs to use a 4.1.1 or newer client library. When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password. Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:
mysql> SET PASSWORD FOR -> @#some_user@#@@#some_host@# = OLD_PASSWORD(@#newpwd@#);
Alternatively, use UPDATE and FLUSH PRIVILEGES:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD(@#newpwd@#) -> WHERE Host = @#some_host@# AND User = @#some_user@#;mysql> FLUSH PRIVILEGES;
Substitute the password you want to use for ``newpwd@#@# in the preceding examples. MySQL cannot tell you what the original password was, so you@#ll need to pick a new one. Tell the server to use the older password hashing algorithm: Start mysqld with the --old-passwords option. Assign an old-format password to each account that has had its password updated to the longer 4.1 format. You can identify these accounts with the following query:
mysql> SELECT Host, User, Password FROM mysql.user -> WHERE LENGTH(Password) > 16;
For each account record displayed by the query, use the Host and User values and assign a password using the OLD_PASSWORD() function and either SET PASSWORD or UPDATE, as described earlier.
For additional background on password hashing and authentication, see section 5.5.9 Password Hashing in MySQL 4.1.
例子:
SET PASSWORD FOR 用户名@localhost = OLD_PASSWORD(@#密码@#);

解决方案 »

  1.   

    以下两种方法之一
    其一:mysql> SET PASSWORD FOR
        -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');其二:
    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')    -> WHERE Host = 'some_host' AND User = 'some_user';mysql> FLUSH PRIVILEGES;
      

  2.   

    贴出C:\webfyz\dq.php on line 7及前面的代码
      

  3.   

    <?
    if(strlen($userid)<1)
    {
    ?>
    <br><br><center><font color=green size=3><b>注 册 会 员 表 单</b></font></center>
    <br>
    <form action="<? echo $PHP_SELF; ?>" method="get" name="frmAdduser">
    <table cellspacing=0 bordercolordark=#FFFFFF width="60%" bordercolorlight=#000000 border=1 align="center" cellpadding="2">
      <tr bgcolor="#6b8ba8" style="color:FFFFFF">
        <td width="100%" align="center" valign="bottom" height="19" colspan="2">请仔细填写以下内容</td>
      </tr>
      <tr>
        <td width="30%" align="right" height="19">姓名:</td>
        <td width="70%"><input type="text" name="userid" size="10" maxlength="18"></td>
      </tr>
      <tr>
        <td width="30%" align="right" height="19">性别:</td>
        <td width="70%"><input type="radio" name="sex" value="男" checked>男
    <input type="radio" name="sex" value="女">女</td>
      </tr>
      <tr>
        <td width="100%" align="center" colspan="2"><input type="submit" value="马上注册"> <input type="reset" value="全部重写"></td>
      </tr>
    </table>
    </form>
    <?
    }
    else
    {
    //连接到本地mysql数据库
    $myconn=mysql_connect("127.0.0.1","root","1");
    mysql_select_db("zhuche",$myconn);
    //将用户填写信息添加到数据库
    $strSql="insert into user(userid,sex)
     values('$userid','$sex')";
    $result=mysql_query($strSql,$myconn) or die(mysql_error());
    //关闭对数据库的连接
    mysql_close($myconn);
    echo "<br><br><br><center>您已经成功注册成我们的会员</center>";
    }
    ?>