I have allowed access to phpMyAdmin on first PC. I can open phpMyAdmin by opening in browser http://192.168.100.10:8080/phpmyadmin
on another PC in local LAN. And also I can open via browser DB in phpMyAdmin on another PC
But I can't create connection to the DB via java code:
Class.forName("com.mysql.jdbc.Driver");
// Setup the connection with the DB
Properties info = new Properties();
info.put("characterEncoding", "UTF-8");
info.put("user", "root");
info.put("password", "");
info.put("autoReconnect", "true");
info.put("useSSL", "false");
info.put("failOverReadOnly", "false");
info.put("maxReconnects", "10");
info.put("connectTimeout", "2000");
DriverManager.setLoginTimeout(10);
mConnection = DriverManager.getConnection(
"jdbc:mysql://192.168.100.10:8080/flats_flx", info
);//here it's stuck
mStatement = mConnection.createStatement();
Here https://stackoverflow.com/a/27700425/2425851 I found that I need to "Allow Network Access to MySQL" How to do that in phpMyAdmin?