Challenge with setting up MySQL

Hi bathe,

Try to add data sources using EAP cli mode and follow the below commands:

  1. connect to the jboss-cli
    $Jboss_home/bin/jboss-cli.bat --controller=x.x.x.x:9990
  2. Add modules
    module add --name=com.mysql --resources=/path/to/mysql.jar --dependencies=javax.api,javax.transaction.api
  3. Add subsystem
    /subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql,driver-class-name=com.mysql.jdbc.Driver)

{“outcome” => “success”}

  1. Add data source
    data-source add --name=MysqlDS --jndi-name=“java:jboss/MySqlDS” --driver-name=mysql --driver-class=com.mysql --connection-url=jdbc:mysql://x.x.x.x:3306/sso --user-name=poonam --password=poonam

  2. enable data source
    data-source --name=MysqlDS --enabled=true

  3. reload server
    relaod

Now your data source is ready.