I am trying jdbc connection with mysql but getting SQLException.
My code is:--
public void createConn() throws MysqlException {
try {
String url ="jdbc:mysql://172.168.1.73:3306/mysql";
Connection con =DriverManager.getConnection(url,"root", "");
System.out.println("URL: " + url);
System.out.println("Connection: " + con);
}
i am getting following exception...
java.sql.SQLException: Access denied for user 'root'@'192.168.1.187' (using password: NO)
I am trying to connect to 172.168.1.73 but it is trying to coonect to 192.168.1.187...
root user doesnt have any password.
Please tell me how can i solve this issue.