MySQL Data Source

Live API Creator supports a subset of the full range of MySQL/MariaDB data types. Live API Creator includes the MariaDB JDBC driver, however, you can replace this with the MySQL JDBC driver and configure the URL to include specific properties.

For data type documentation, see the MySQL documentation.

Install the MySQL JDBC Driver

Install the mysql-connector-java-<version>-bin.jar driver into the following directory:

  • (The self-contained, single-user version of Live API Creator based on Jetty) The %JETTY_HOME%/caliveapicreator/lib/ext directory.
Note: This package already includes the MariaDB JDBC driver.
  • (Tomcat) The %Tomcat_Home%/lib directory.

For more information about the supported versions of the JDBC drivers, see Supported Platforms.

Connect to a MySQL Database

Prerequisites: You know your JDBC connection information.

Connect to your database by creating your API project. For more information about creating API projects, see Create your API Project.

  1. In the Create API wizard, select MySQL.
  2. Complete the Database, host, port, and password fields, including the following fields, and then click Continue:

Database

This database value accepts double quotesUse double quotes to accept the value of mixed-case (non-standard) database value.

Username

This database value accepts double quotesUse double quotes to accept the value of mixed-case (non-standard) username.

You are connected to the database.

MySQL Supported Data Types

Live API Creator supports read and write of the following MySQL data types:

Data typeModeled as... Notes
smallint
smallint unsigned
number
integer
integer unsigned
number
bigint
bigint unsigned
number
decimalnumber 
float    number  
varcharstring 
mediumint    number 
timestampSimpleTimestamp 
varbinary bytes 
 longblob bytes             
mediumblob    bytes              
longtext        bytes
dateSimpleDate 
timeSimpleTimeIf you are using a time change to the JDBC URL connection (data source):
jdbc:mysql://server:5432/database?noDatetimeStringSync=true

For more information about connecting to the database, including information about noDatetimeStringSync, see the MySQL JDBC driver documentation.

tinyint
timyint unsigned
number