java to mysql connection error
所在版块:社会百科 发贴时间:2004-05-18 18:16

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
conn = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/DB, "root", "password");


error message:
Exception in thread "main" java.sql.SQLException: Data source rejected establishment of connection, message from server: "Host 'idwsg' is not allowed to connect to this MySQL server"
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:589)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1654)
at com.mysql.jdbc.Connection.<init>(Connection.java:432)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at Simexecute.connectDB(Simexecute.java:3432)
at Simexecute.<init>(Simexecute.java:310)
at Simexecute.main(Simexecute.java:3461)


请问这个问题出在server, j2-re, java-connector, 还是 mysql-server 的configuration ?
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

Put your OWN COOL signature here!
 相关帖子 我要回复↙ ↗回到正文
java to mysql connection error 孤剑走天涯   (948 bytes , 478reads )
settled?:P MrDJay   (9 bytes , 228reads )