I got this to finally connect after reading old documentation. I am not sure if this is the best way, so if you have suggestions for better connection strings or wildfly pool settings please post.
Enter in the file path ${EAP_HOME}/modules/system/layers/base and create the directories com/mysql/driver8/main.
Into the folder main copy the driver(mysql-connector-java-8.0.11.jar) library jar, and create a file module.xml as showed in the sample below
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.mysql.driver8">
<resources>
<resource-root path="mysql-connector-java-8.0.11.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
Then go to /wildfly-12.0.0.Final/standalone/standalone.xml copy and paste this into
<datasource jndi-name="java:jboss/MySqlDS8" pool-name="MySqlDS8">
<connection-url>jdbc:mysql://localhost:3306/mysql?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC</connection-url>
<driver>mysql8</driver>
<security>
<user-name>root</user-name>
<password>12341234</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
</validation>
</datasource>
Then go to the section and copy and paste this.
<driver name="mysql8" module="com.mysql.driver8">
<xa-datasource-class>com.mysql.cj.jdbc.MysqlDataSource</xa-datasource-class>
</driver>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With