2013年10月5日星期六

java.sql.SQLException: Access denied for user'' @ 'localhost' (using password: NO

I used to do myeclipse jsp jsp files open on the page where they reported the above error . Using the mysql client can connect to the database . In online search are user'root ', while my user behind '' is empty, I think it should be me change my password or useless reasons for it. Just beginning to learn jsp, seeking answers .
------ Solution ---------------------------------------- ----
find connecting to the database code, and then look at the user name and password is not correct
------ For reference only --------------- ------------------------
online ~ ~ help out .
------ For reference only -------------------------------------- -
thanks a lot ~ ~
In connection inside plus a user name and password just fine
Class.forName ("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection ("jdbc: mysql :/ / localhost: 3306/bbs", "root", "123");

没有评论:

发表评论