Я пытаюсь настроить источник данных JDBC в консоли администратора Glassfish, как показано здесь -
https://javatutorial.net/configure-glassfish-mysql
Но я вижу ошибку ниже при попытке пинговать из 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.
Я использую GlassFish Server Open Source Edition 5.0 (сборка 25) и MySQL 8.0 с MySQL Connector / J 8.0.
В консоли администратора для имени класса источника данных установлено значение -
com.mysql.cj.jdbc.MysqlDataSource
В свойствах пула соединений JDBC настроены следующие свойства:
password - <password>
databaseName - <dbName>
URL - jdbc:mysql://<public_ip>:3306/<dbName>
Url - jdbc:mysql://<public_ip>:3306/<dbName>
datasourceName - <dbName>
user - root
Может кто-нибудь помочь?






После установки
useSSL = false,
пинг прошел успешно.
<jdbc-connection-pool datasource-classname = "com.mysql.cj.jdbc.MysqlDataSource" name = "MySQLOnOracle" res-type = "javax.sql.DataSource"> <property name = "password" value = "** ******* "> </property> <property name = " databaseName "value = " Learndb "> </property> <property name = " URL "value = " jdbc: mysql: //144.xx. 6x.xxx:3306/learndb "> </property> <property name = " Url "value = " jdbc: mysql: //144.xx.6x.xxx: 3306 / Learndb "> </property> <property name = "datasourceName" value = "Learndb"> </property> <property name = "user" value = "root"> </property> </jdbc-connection-pool>