Guest User

Untitled

a guest
Jan 12th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. java.sql.SQLException: Access denied for user 'xx@xx.xx' (using password: YES) appearing 2 years after installation
  2. java.sql.SQLException: Access denied for user 'xx@xx.xx' (using password: YES)
  3.  
  4. public static Connection getConnection() throws SQLException {
  5. String driver = "com.mysql.jdbc.Driver";
  6. String url = "jdbc:mysql://localhost:3306/dbName"; // Change it to your database name
  7. String username = "root";
  8. String password = "yourPassword"; // Change it to your Password
  9. System.setProperty(driver,"");
  10.  
  11. return DriverManager.getConnection(url,username,password);
  12.  
  13. }
Add Comment
Please, Sign In to add comment