Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- java.sql.SQLException: Access denied for user 'xx@xx.xx' (using password: YES) appearing 2 years after installation
- java.sql.SQLException: Access denied for user 'xx@xx.xx' (using password: YES)
- public static Connection getConnection() throws SQLException {
- String driver = "com.mysql.jdbc.Driver";
- String url = "jdbc:mysql://localhost:3306/dbName"; // Change it to your database name
- String username = "root";
- String password = "yourPassword"; // Change it to your Password
- System.setProperty(driver,"");
- return DriverManager.getConnection(url,username,password);
- }
Add Comment
Please, Sign In to add comment