免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4257 | 回复: 2
打印 上一主题 下一主题

mysql 在linux终端用普通用户登录失败 [复制链接]

论坛徽章:
1
IT运维版块每日发帖之星
日期:2016-08-21 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-26 21:24 |只看该作者 |倒序浏览
系统: centOS linux
数据库:php-4.3.9-3.15

用root登录时正常,可以进入

但是新建了一个PHP用户(已经授权)在linux终端(本机)就登录不了,在远程用ems可以登录,说明密码没错。

[root@local ~] mysql -uphp -p123456

报错信息:ERROR 1045 (28000): Access denied for user 'php'@'localhost' (using password: YES)

请哪位朋友指点一下。

论坛徽章:
0
2 [报告]
发表于 2008-10-28 11:28 |只看该作者
我是这样创建的,但是没有问题

[root@localhost ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create user php identified by '123456';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
[root@localhost ~]# mysql -uphp -p123456
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+
2 rows in set (0.01 sec)

论坛徽章:
0
3 [报告]
发表于 2008-10-28 12:37 |只看该作者
你的用户授权是怎么做的?!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP