Spring+Hibernate, 用C3P0连接池, 连接MySQL. 问题出在 我用如下代码连接数据库,一点问题.但是同样地账户,主机,JDBC URL在Spring项目启动的时候连接数据库出现如下错误
java.sql.SQLException: null, message from server: "Host 'WZZ-PC' is not allowed to connect to this MySQL server"Class.forName("com.mysql.jdbc.Driver");
Connection conn=DriverManager.getConnection("jdbc:mysql://WZZ-PC:3306/mmshuxia?useUnicode=true&characterEncoding=UTF-8",
"dev",
"qwe123");
System.out.println(conn);MySQL权限已经设置,如果是权限的问题,我手动的代码页应该连接不上.哪位大虾知道这是为什么?
java.sql.SQLException: null, message from server: "Host 'WZZ-PC' is not allowed to connect to this MySQL server"Class.forName("com.mysql.jdbc.Driver");
Connection conn=DriverManager.getConnection("jdbc:mysql://WZZ-PC:3306/mmshuxia?useUnicode=true&characterEncoding=UTF-8",
"dev",
"qwe123");
System.out.println(conn);MySQL权限已经设置,如果是权限的问题,我手动的代码页应该连接不上.哪位大虾知道这是为什么?
localhost root *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 Y Y
% root *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9