In the Datasource Type field, select RDBMS and Default from the lists.
If you enter External instead of the Default datasource type, your datasource should be supported by an external provider class, such as
com.mysql.jdbc.jdbc2.optional.MysqlXADataSource.You can select s the the External option and enter the name and value of connection properties by clicking Add Property. For example,
After an external datasource is created, it can be used as a usual datasource in queries. See the tutorial on handling distributed transactions for more information on using external datasources.
- Enter MySQL in the Database Engine field.
Enter the following driver class for MySQL in the Driver Class URL field: com.mysql.jdbc.Driver.
Be sure to download the JDBC driver for MySQL from here and copy it to your
If the driver class does not exist in the relevant folders when you create the datasource, you will get an exception such as 'Cannot load JDBC driver class com.mysql.jdbc.Driver'.
See the section on working with RDBMS datasources, for more options that you can use with your RDBMS data service.
Enter the URL to your MySQL database in the URL field: jdbc:mysql://localhost:3306/trainingdb
Enter the username and password to connect to your MySQL database. By default the username is root and the password is blank.