Learn how to connect to a MySQL database with Exasol and then load data.
To view details about data type mappings or to migrate data, see the MySQL to Exasol migration script on GitHub.
The MySQL server must be reachable from the Exasol system.
The user credentials in the connection must be valid.
Download the JDBC driver for MySQL from the MySQL Connectors portal. For operating system, select Platform Independent.
Do the following to configure the driver in EXAoperation:
MySQLcom.mysql.jdbc.Driverjdbc:mysql:To create a connection, run the following statement. Replace the connection string and credentials as needed.
The MySQL user must have enough privileges to create a connection.
CREATE OR REPLACE CONNECTION JDBC_MYSQL
TO 'jdbc:mysql://192.168.99.100:3306/my_database'
USER 'user_name'
IDENTIFIED BY 'my_password';
To test the connection, run the following statement.
select * from
(
import from JDBC at JDBC_MYSQL
statement 'select ''Connection works'' from dual'
);
Use IMPORT to load data from a table or SQL statement using the connection that you created.