刚才的错误提示就该是:
提示如下错误:ERROR 1045: Access denied for user: 'dbuser@localhost' (Using password: YES)
提示如下错误:ERROR 1045: Access denied for user: 'dbuser@localhost' (Using password: YES)
解决方案 »
- MySQL一字段不能插入汉字。
- 关于两个表sum求和的问题,sql怎么写?
- mysql 计算字符长度问题
- 安装mysqlworkbench时,出现error 25581 cannot connect to windows firewall错误,要怎么修改啊?
- (求救! 急!) 在postgreSQL中使用VB的参数变量
- 一个关于MYSQL的较复杂的查询语句.
- 请问各位!新手万分感激!^-^,关于数据恢复的.
- Another quetion .Why my mysql server(On Linux) allways shutdown when i start it?
- (100分)在mysql中,select * from table1 LEFT JOIN table2 ON table1.id=table2.id,哪一个是左表,哪一个是右表,怎样使用 left joi
- select with(xlock)
- 求助:mysql中isAfterLast()方法怎么总是false啊!!!!!!!
- 请问,mysql,有什么办法能够缓冲不紧急的query,先执行一些必需的query。
是一定会提示出错的.
ERROR 1045: Access denied for user: 'dbuser@localhost' (Using password: YES)
提示给的很清楚,你登录时实际上匹配的用户是 'dbuser@localhost'
而并没有匹配 'dbuser@%'怎么样才能使用 'dbuser@%' 帐号呢??????使用下面的语句登录,(假设你的 MySQL 安装在 192.168.0.1) 的主机上
mysql -h 192.168.0.1 -u dbuser -p123456注意,一定要用IP地址....
IP Address. . . . . . . . . . . . : 192.168.0.98
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.0.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1c:\>mysql -uroot -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 172 to server version: 4.0.17-max-debugType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> grant all on *.* to dbuser@"%" identified by '123456';
Query OK, 0 rows affected (0.03 sec)mysql> exit
Byec:\>mysql -udbuser -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 174 to server version: 4.0.17-max-debugType 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>
loveflea(coolwind) 建议你执行SELECT CURRENT_USER() ;
返回当前会话被验证匹配的用户名:
我用grant all on *.* to dbuser@"%" identified by '123456'WITH GRANT OPTION;创建用户,并且执行flush privileges
用mysql -u dbuser -p提示Enter password:输入密码'123456'报错ERROR 1045: Access denied for user: 'dbuser@localhost' (Using password: YES)如果不输入密码直接登陆可以,这是什么原因!!
shuixin13(犬犬(心帆)) thanks
hehe,我的mysql.user没有Host = "localhost" User="" 的授权用户记录mysql> SELECT CURRENT_USER() ;
+----------------+
| CURRENT_USER() |
+----------------+
| dbuser@% |
+----------------+
1 row in set (0.03 sec)mysql> use mysql;
Database changed
mysql> select host,user from user;
+-----------+---------+
| host | user |
+-----------+---------+
| % | dbuser |
| localhost | root |
+-----------+---------+
2 rows in set (0.00 sec)