String driver_class_name = "com.mysql.jdbc.Driver";
String user = "queryuser";
String pass = "mypassword";
String url_db_connection = "jdbc:mysql://10.20.216.42:3306/my_dbase";
try {
Class.forName(driver_class_name).newInstance();
Connection con = DriverManager.getConnection(url_db_connection,
user, pass);
java.sql.Statement stmt = con.createStatement();
ResultSet res = stmt.executeQuery("SELECT * FROM my_table"
;
......
The issue is that wher I run this from the computer where Wamp is installed, it works fine. When I run it from any other computer, it gives me a connection timeout error.
The user queryuser is granted access from any machine.
Thanks!