Am trying to setup JDBC Datasource in Glassfish Admin Console as demonstrated here -
https://javatutorial.net/configure-glassfish-mysql
But am seeing the below error upon trying to ping from Glassfish.
Ping Connection Pool failed for MySQLOnOracle. Connection could not be allocated because: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. Please check the server.log for more details.
Am using GlassFish Server Open Source Edition 5.0 (build 25) and MySQL 8.0 with MySQL Connector/J 8.0.
In the admin console, Datasource Classname is set to -
com.mysql.cj.jdbc.MysqlDataSource
Under JDBC Connection Pool Properties, the following properties are configured -
password - <password>
databaseName - <dbName>
URL - jdbc:mysql://<public_ip>:3306/<dbName>
Url - jdbc:mysql://<public_ip>:3306/<dbName>
datasourceName - <dbName>
user - root
Can someone please help?