File Exchange

image thumbnail

Download and configure JDBC driver

Download JDBC driver and configure java class path required for Database Toolbox.

29 Downloads

Updated 06 Oct 2017

View License

[status,message] = configureJDBCDriver(vendor)
downloads JDBC driver for the given vendor in MATLAB's preferences directory and configures the java class path. status indicates if the operation was a SUCCESS, ERROR or NO ACTION. message is associated with the status returned, which is an optional argument.

[status,message] = configureJDBCDriver(vendor,Name,Value)

downloads and configures JDBC driver using Name-Value arguments.

Supported Vendors:
---------------------------
- 'MySQL'
- 'PostgreSQL'
- 'SQLite'
- 'MariaDB'
- 'Amazon Redshift'
- 'Amazon Aurora'

Name-Value arguments:
--------------------------------
DownloadOnly - Default value is false. If set to true, JDBC driver only downloaded. Java class path is not configured.
DownloadLocation - By default, JDBC driver is downloaded in the MATLAB's preferences directory. You may provide a different
location on your machine where you would like to download the JDBC driver.
SuppressMsgBox - Default value is false. If set to true, message box is suppressed from being displayed.

Example:
--------
status = configureJDBCDriver('MySQL')
downloads MySQL JDBC driver in MATLAB's preferences directory and configures javaclasspath.txt to add the JDBC driver to
static java class path.

status = configureJDBCDriver('MySQL','DownloadOnly',true)
downloads MySQL JDBC driver in MATLAB's preferences directory.

status = configureJDBCDriver('MySQL','DownloadOnly',true,'DownloadLocation','C:\work')
downloads MySQL JDBC driver in C:\work directory.

status = configureJDBCDriver('MySQL','DownloadLocation','C:\work')
downloads MySQL JDBC driver in C:\work direcotry and configures javaclasspath.txt to add the JDBC driver to static java class
path.

status = configureJDBCDriver('MySQL','SuppressMsgBox',true)
downloads MySQL JDBC driver in MATLAB's preferences directory and configures javaclasspath.txt to add the JDBC driver to
static java class path. Suppresses the message box from being displayed

This method is supported in MATLAB R2017a and later.

Cite As

MathWorks Computational Finance Team (2019). Download and configure JDBC driver (https://www.mathworks.com/matlabcentral/fileexchange/64463-download-and-configure-jdbc-driver), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Ben Mercer

When I try to run this I get the error:
Could not establish a secure connection to "bitbucket.org". The reason is "error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed". Check your certificate file (C:\Program Files\MATLAB\R2018b\sys\certificates\ca\rootcerts.pem) for expired, missing or invalid certificates.

What action should I take in this case?

Thanks! A pretty neat solution, i have been trying to figure out what I was missing while following the steps to install this for so long.

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux