java.sql.SQLException: Access denied for user ‘’@‘localhost’ (using password: NO)的问题
我自己的原因
1.Connection conn=DriverManager.getConnection(url,username,password);
一定要有url,username,password,三个参数!!!
2.配置文件db.properties
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://127.0.0.1:3306/student?useUnicode=true&characterEncoding=UTF-8
username=root
password=***
用户名是username!!! 密码也要写对!!! 获得的时候也要改
user = prop.getProperty(" username");