I have checked most of the comments for this problem and still couldn't work it out. I am using eclipse and writing the program with java, I have successfully established connections to my local SQL and everything was working
Now I am trying to connect to a DB in the goDaddy service
I am using the following format
private String conUrl = "jdbc:mysql://someIP:3306/DBname";
private String userName = "userName123";
private String pw ="userName123Password";
private static Set<Connection> conSet = new HashSet<Connection>();
public final int max_Con =5;
public static Object key = new Object();
private ConnectionPool() throws ClassNotFoundException, SQLException {
Class.forName("com.mysql.jdbc.Driver");
// java.sql.Driver test = DriverManager.getDriver(conUrl);
// System.out.println(test);
for (int i = 0; i < max_Con; i++)
{
Connection con =
DriverManager.getConnection(conUrl,userName,pw);
conSet.add(con);
}
Where the username and its password is registered to the specific DB granted with all privileges.
I get an exception of the following
Exception in thread "main" java.sql.SQLException: Access denied for user 'userName123'@'myIPadress.cablep.bezeqint.net' (using password: YES)
Did anyone encounter this problem?
I should mention that bezeqint.net is my internet supplier and a friend of mine did get a connection using a php application with the same DB.