- 论坛徽章:
- 0
|
10可用积分
在mysql.user权限表中,用户psxbill用户在dbhost主机上有权限,如下所示:
其中dbhost为本地域名,其对应ip即为数据库所在服务器ip,但是用mysql -u psxbill -h dbhost -p 没法连上
另外,已经flush privileges了
mysql> use mysql
Database changed
mysql> select user,host,password from user where user='psxbill';
+---------+------------+-------------------------------------------+
| user | host | password |
+---------+------------+-------------------------------------------+
| psxbill | localhost | *45DF7BA5A690EE7D781A3AA2FB813E241B76E6D1 |
| psxbill | loghost | *45DF7BA5A690EE7D781A3AA2FB813E241B76E6D1 |
| psxbill | webhost | *45DF7BA5A690EE7D781A3AA2FB813E241B76E6D1 |
| psxbill | dbhost | psxbill |
| psxbill | radiushost | *45DF7BA5A690EE7D781A3AA2FB813E241B76E6D1 |
+---------+------------+-------------------------------------------+
5 rows in set (0.00 sec)
[root@gao bin]# cat /etc/hosts
#Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
xx.xx.xxx.xx postppr postppr
xx.xx.xxx.xx loghost loghost
xx.xx.xxx.xx dbhost dbhost
xx.xx.xxx.xx webhost webhost
[root@gao bin]# mysql -u psxbill -h dbhost -p
Enter password:
ERROR 1045 (28000): Access denied for user 'psxbill'@'postppr' (using password: YES) |
最佳答案
查看完整内容
你的密码是明文的MySQL不识别的用以下语句改一下update user set password=password('123456') where user='psxbill' and host='psxbill';flush privileges;然后再试一下
评分
-
查看全部评分
|