当前位置: 技术问答>java相关
连接Mysql出现的一个问题
来源: 互联网 发布时间:2015-08-14
本文导语: 抱错: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'root@localhost' (Using password: YES) 怎么解决呀? | 应该这样: Connection con = DriverManager.getConnection("jdbc:mysql://localhos...
抱错:
java.sql.SQLException: Invalid authorization specification: Access denied
for user: 'root@localhost' (Using password: YES)
怎么解决呀?
|
应该这样:
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbname","root","YES");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbname","root","YES");