I am new to google cloud, and I just configure all components needed in cloud computation. But I have a problem on MySQL connection between MySQL and APP engine/VM. I can browser see my main html page, but when my servlet try to make MySQL connection and it failed.
Class.forName("com.mysql.cj.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://mysql external IP:3306/Database?user=us&password=pw");
Error message: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure and The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. Class.forName("com.mysql.jdbc.GoogleDriver"); con = DriverManager.getConnection("jdbc:google:mysql://mysql external IP:3306/Database?user=us&password=pw"); Error message: java.lang.ClassNotFoundException: com.mysql.jdbc.GoogleDriver at java.net.URLClassLoader.findClass(URLClassLoader.java:382) I add appengine-web.xml in WEB-INF folder with true
Does anyone have the solution on this? I deploy to google cloud from my local Eclipse 2020-06 version.
Thanks