Chinaunix

标题: mysql 在linux终端用普通用户登录失败 [打印本页]

作者: zf0702    时间: 2008-10-26 21:24
标题: mysql 在linux终端用普通用户登录失败
系统: 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)

请哪位朋友指点一下。
作者: sunhaiyang    时间: 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)
作者: jerrywjl    时间: 2008-10-28 12:37
你的用户授权是怎么做的?!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2