首页上一页 1  下一页尾页 1 条记录 1/1页
        public class Conn {
public static void main(String[] args) {
try{
String mysql = "com.mysql.jdbc.Driver";
String dbms = "jdbc:mysql://127.0.0.1:3306/employee";
String userName = "root";
String Pwd = "mysql123";
Class.forName(mysql);
Connection conn = DriverManager.getConnection(dbms,userName,Pwd);
System.out.println(conn);
conn.close();
}catch(ClassNotFoundException e){
e.printStackTrace();
} catch (SQLException e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}
}
}
老是提示:java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
错误
我用navicat,或者cmd,运行都没问题

 
	
                                                 VIP会员
VIP会员 购物车
购物车


 私信
                         私信 
                     
					 
					 
					 
					 
					 发表新帖
发表新帖 立即签到
立即签到 查看视频
查看视频
                                 
        		  
        		 
         		 关注
关注
                  回复
 回复 支持(
                	支持( 反对(
                    反对( 
                     
               			  已解决
已解决 
                







 
                     
                     
					 
						 
						 
						 
						