mysql root @ localhost没有权限

时间:2013-07-15 02:08:20

标签: mysql

我曾尝试在mysql上创建一个表,但我一直在使用。

CONSOLE: [SEVERE] Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)

但我应该允许一切

mysql> SHOW GRANTS FOR 'root'@'localhost';
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*60BF85ECA0CB9AEA703C24F4B193EDE2A32A7879' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

我错过了什么?

1 个答案:

答案 0 :(得分:3)

好吧,这似乎是你的问题(强调我的):

  

CONSOLE: [SEVERE] Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (使用密码:否)

显然您没有在连接详细信息中指定密码。