Drivers

MySQL Driver Documentation

This documentation explains the MySQL driver implementation and how connection parameters map to UI fields in the Gigantic application.

Connection Parameters

UI FieldTechnical ImplementationDescriptionRequiredDefault Value
Hosthost in mysql2 connection configThe hostname or IP address of the MySQL serverYeslocalhost
Portport in mysql2 connection configThe port number MySQL server is listening onYes3306 (from driverPorts)
Databasedatabase in mysql2 connection configThe name of the database to connect toYesNone (must be specified)
Usernameuser in mysql2 connection configDatabase user for authenticationYesNone (must be specified)
Passwordpassword in mysql2 connection configPassword for the database userYesNone (must be specified)

Technical Details

The MySQL driver implementation uses the mysql2 Node.js library. Connection parameters are passed directly to the mysql2 library's connection configuration.

When SSH tunneling is enabled, connections are first established through the tunnel before connecting to the MySQL server.

Authentication Options

MySQL supports standard username/password authentication.

Auth TypeUI MappingDescription
NoneNot applicable for MySQLDisables authentication
PasswordUsername/Password fieldsStandard username/password authentication
Password ManagerVarious password manager fieldsFetches credentials from external password managers

SSH Tunnel Support

The MySQL driver supports SSH tunneling for secure access to databases behind firewalls or in private networks. For detailed information on configuring SSH tunnels, please refer to the SSH Tunnelling documentation.

API Endpoints Used

MySQL connections are primarily used in:

  • Tap creation (data source discovery)
  • Sink creation (data destination for anonymized data)
  • Pipeline execution (data extraction and loading)

Custom Params

The MySQL driver supports additional custom parameters that can be specified in YAML format to fine-tune connection behavior, pooling, SSL settings, and other advanced options.

Connection Parameters

# SSL Configuration
ssl:
  rejectUnauthorized: false
  ca: |
    -----BEGIN CERTIFICATE-----
    # CA certificate content
    -----END CERTIFICATE-----
  key: |
    -----BEGIN PRIVATE KEY-----
    # Client private key content
    -----END PRIVATE KEY-----
  cert: |
    -----BEGIN CERTIFICATE-----
    # Client certificate content
    -----END CERTIFICATE-----
  ciphers: "ECDHE-RSA-AES256-SHA:AES256-SHA"
  minVersion: "TLSv1.2"
  maxVersion: "TLSv1.3"

# Authentication Parameters
password1: additional_password  # 1st factor authentication
password2: otp_code            # 2nd factor authentication
password3: biometric_data     # 3rd factor authentication

# Advanced connection options
connectTimeout: 10000
charset: "UTF8MB4_UNICODE_CI"
compress: true
multipleStatements: false
timezone: "+00:00"
enableKeepAlive: true
keepAliveInitialDelay: 10000
supportBigNumbers: true
bigNumberStrings: true
dateStrings: false

Pool Configuration

# Pool sizing options
connectionLimit: 10
maxIdle: 10

# Pool timeout options
idleTimeout: 60000
queueLimit: 0

# Pool behavior options
waitForConnections: true

Example Configurations

SSL Configuration

ssl:
  rejectUnauthorized: true
  ca: ${file:/path/to/ca-cert.pem}
  cert: ${file:/path/to/client-cert.pem}
  key: ${file:/path/to/client-key.pem}

Advanced Configuration with Big Number Support

supportBigNumbers: true
bigNumberStrings: true
decimalNumbers: true
timezone: "UTC"
connectionLimit: 15
idleTimeout: 30000