title: Add new Datasource (mysql) wildfly
body: <p>I'm trying to add new datasource mysql jdbc driver to my wildfly server </p>
  
  <p>I created folder  wildfly.x.x.x/modules/system/layers/base/com/mysql/main
  I've got here jdbc jar file and module.xml</p>
  
  <pre><code>&lt;module xmlns="urn:jboss:module:1.3" name="com.mysql"&gt;
          &lt;resources&gt;
           &lt;resource-root path="mysql-connector-java-5.1.34-bin.jar"/&gt;
       &lt;/resources&gt;
       &lt;dependencies&gt;
        &lt;module name="javax.api"/&gt;
       &lt;/dependencies&gt;
      &lt;/module&gt;
  </code></pre>
  
  <p>then added dataresource code into standalone-full.xml (under datareources tag)</p>
  
  <pre><code> &lt;datasource jndi-name="java:jboss/datasources/MySQLDS" pool-name="MySQLDS"     enabled="true" use-java-context="true"&gt;
   &lt;connection-url&gt;jdbc:mysql://localhost:3306/test&lt;/connection-url&gt;
   &lt;driver&gt;MySQLDriver&lt;/driver&gt;
  &lt;security&gt;
   &lt;user-name&gt;root&lt;/user-name&gt;
   &lt;password&gt;&lt;/password&gt;
  &lt;/security&gt;
  &lt;/datasource&gt;
  </code></pre>
  
  <p>but when i go to wildfly control panel <code>http://localhost:9990/console/</code>
  dataresource doesnt appear , what did i missed?</p>
  
  <p>also i'm trying to add it manually from interface i'v got this error</p>
  
  <pre><code>Unexpected HTTP response: 500
  
  Request
  {
      "address" =&gt; [
          ("subsystem" =&gt; "datasources"),
          ("data-source" =&gt; "mysql")
      ],
      "operation" =&gt; "test-connection-in-pool"
  }
  
  Response
  
  Internal Server Error
  {
      "outcome" =&gt; "failed",
      "failure-description" =&gt; "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",
      "rolled-back" =&gt; true
  } 
  </code></pre>