LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1098|回复: 5

MYSQL错误代码-1250,这是为何?

[复制链接]
发表于 2004-3-9 17:47:55 | 显示全部楼层 |阅读模式
我的MYSQL服务器只能在命令行的模式下登录!是这样的:我用有效的用户名只能在命令行的方式下登录,可同样的用户名就是不能在PHP或是ODBC下连接,这是为何?我装好了phpMyAdmin-2.5.4,设置好后出现如下的提示:
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.

Error

MySQL said:


#1250 - Client does not support authentication protocol requested by server; consider upgrading MySQL client
[Documentation]

这是什么原因呢?请各位大虾帮帮忙,好多天了,老是因为这个原因,学习的路上停滞不前!!唉----
发表于 2004-3-10 08:21:55 | 显示全部楼层
你的php是否支持mysql数据库呢?

确定吗?

在什么系统下,如何安装的呢?
 楼主| 发表于 2004-3-10 17:50:03 | 显示全部楼层
“黄叶”版主:
    谢谢你的回复!
    我是在windows2003上测试的,PHP可以支持mysql数据库,我试过用PHP编写了网页,测试时如过用匿名的用户就可以在PHP中建立连接,但只要用需要密码的用户就不能建立连接!
发表于 2004-3-11 08:33:05 | 显示全部楼层
是否已经设置好mysql的权限问题,在mysql客户端下可以使用密码登录吗?
 楼主| 发表于 2004-3-11 17:54:42 | 显示全部楼层
在本机上用命令行方式(即在DOS下)测试用有效的用户名和密码可以登录,我是家用电脑,没有条件用另一台电脑充当客户机,mysql的权限问题请看我的MYSQL数据库的USER表和DB表如下:
mysql> select * from user;
+-----------+---------+-------------------------------------------+-------------
+-------------+-------------+-------------+-------------+-----------+-----------
--+---------------+--------------+-----------+------------+-----------------+---
---------+------------+--------------+------------+-----------------------+-----
-------------+--------------+-----------------+------------------+----------+---
---------+-------------+--------------+---------------+-------------+-----------
------+
| Host | User | Password | Select_priv
| Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_pri
v | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | In
dex_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock
_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | ssl_type | ss
l_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connec
tions |
+-----------+---------+-------------------------------------------+-------------
+-------------+-------------+-------------+-------------+-----------+-----------
--+---------------+--------------+-----------+------------+-----------------+---
---------+------------+--------------+------------+-----------------------+-----
-------------+--------------+-----------------+------------------+----------+---
---------+-------------+--------------+---------------+-------------+-----------
------+
| % | root | *34DC17A0F10257FE664A10F25360D730439F61D1 | Y
| Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y
| Y | Y | Y | |
| | | 0 | 0 |
0 |
| % | user | *34DC17A0F10257FE664A10F25360D730439F61D1 | Y
| N | N | N | N | N | N
| N | N | N | N | N | N
| N | N | N | N | N
| N | N | N | |
| | | 0 | 0 |
0 |
| % | hi | *B6BDA741F59FE8066344FE3E118291C5D7DD12AD | Y
| N | N | N | N | N | N
| N | N | N | N | N | N
| N | N | N | N | N
| N | N | N | |
| | | 0 | 0 |
0 |
| localhost | webauth | *431B26E90A031D51FAF20CFC481246D61D8B9170 | N
| N | N | N | N | N | N
| N | N | N | N | N | N
| N | N | N | N | N
| N | N | N | |
| | | 0 | 0 |
0 |
+-----------+---------+-------------------------------------------+-------------
+-------------+-------------+-------------+-------------+-----------+-----------
--+---------------+--------------+-----------+------------+-----------------+---
---------+------------+--------------+------------+-----------------------+-----
-------------+--------------+-----------------+------------------+----------+---
---------+-------------+--------------+---------------+-------------+-----------
------+
4 rows in set (0.02 sec)

还有DB表如下:
mysql> select * from db;
+-----------+-------+------+-------------+-------------+-------------+----------
---+-------------+-----------+------------+-----------------+------------+------
------+-----------------------+------------------+
| Host | Db | User | Select_priv | Insert_priv | Update_priv | Delete_pr
iv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_priv | Alter
_priv | Create_tmp_table_priv | Lock_tables_priv |
+-----------+-------+------+-------------+-------------+-------------+----------
---+-------------+-----------+------------+-----------------+------------+------
------+-----------------------+------------------+
| localhost | test | user | Y | Y | Y | Y
| N | N | N | N | N | N
| N | N |
| % | books | user | Y | Y | Y | Y
| N | N | N | N | N | N
| N | N |
+-----------+-------+------+-------------+-------------+-------------+----------
---+-------------+-----------+------------+-----------------+------------+------
------+-----------------------+------------------+
2 rows in set (0.02 sec)
我就是用的“user”这个用户名连接books数据库的!(用ROOT也不行!)
   版主请帮我看看问题出在哪里?谢谢!
  (对了,我的MYSQL数据库中除了USER表和DB表外,其它的表全是空表,不是因为这个原因吧?)
 楼主| 发表于 2004-3-12 18:05:54 | 显示全部楼层
请大家帮帮我呀!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表