wildfly registering mysql as a datasource

前端 未结 5 888
隐瞒了意图╮
隐瞒了意图╮ 2021-01-14 14:17

I have been trying to configure mysql as a datasource in wildfly. I am not sure what i am missing out, i get an error on startup .

I have the mysql-connector-java-5

5条回答
  •  独厮守ぢ
    2021-01-14 15:06

    To resolve the mysql datasource configuration issue on Wildfly i used the admin console to add the datasource and test it.

    1. If you login to the web console and find the datasource you tried configuring disable that a remove it . The standalone.xml and the module.xml get reset to the orginal.

      Steps for accessing web console

    2. Configure a new datasource :

      name :mysql
      JNDI :java:jboss/datasources/proj

    3. Click next and enter the url (i used the below) and click enable and then click test
      url : jdbc:mysql://localhost/proj

    4. The test should show success

    5. The changes to the standalone.xml and the module.xml are automatically made .

    6. If you restart the server now it should start without any errors and you should be able to access the database from your web project

提交回复
热议问题