MySQL

This article describes how to create a connection to MySQL using a SQL command.

To write your transformed data into a MySQL table using SQLake, you must first create a connection that provides the appropriate credentials to access your database.

Syntax

CREATE MYSQL CONNECTION  
    <connection_identifier> 
    CONNECTION_STRING = '<connection_string>' 
    USER_NAME = '<user_name>'
    PASSWORD = '<password>' 
    [ COMMENT = '<comment>' ]

Jump to

Connection options

CONNECTION_STRING — editable

Type: text

The connection string to use when connecting to the database. This string can be copied directly from MySQL. The connection string should include the database name at the end of the string.

USER_NAME — editable

Type: text

The user to authenticate to the database with.

PASSWORD — editable

Type: text

The password for the user.

COMMENT — editable

Type: text

(Optional) A description or comment regarding this connection.

Minimum example

CREATE MYSQL CONNECTION mysql_connection
    CONNECTION_STRING = 'jdbc:mysql://demo.c4q3plwekwnv.us-east-1.rds.amazonaws.com:3306/demo'
    USER_NAME = 'your username'
    PASSWORD = 'your password'

Full example

CREATE MYSQL CONNECTION mysql_connection
    CONNECTION_STRING = 'jdbc:mysql://demo.c4q3plwekwnv.us-east-1.rds.amazonaws.com:3306/demo'
    USER_NAME = 'your username'
    PASSWORD = 'your password'
    MAX_CONCURRENT_CONNECTIONS = 10;

Last updated