Skip to main content

Striim for Databricks Documentation

Connect to MySQL

When prompted by the wizard, enter the appropriate connection details.

  • Where is the database located? If your source is an Amazon Aurora for MySQL, Amazon RDS for MySQL , Azure Database for MySQL, or Cloud SQL for MySQL instance, select that, otherwise leave set to the default.

  • Hostname: Enter the IP address or fully qualified network name of the instance (for example, 198.51.100.10 or mydb.123456789012.us-east-1.rds.amazonaws.com) or, if you are connecting via an SSH tunnel, paste the string copied from Striim Cloud Console > Service details > Secure connection > Tunnel Address (see Configure Striim to use your SSH tunnel).

  • Port: Enter the port for the specified host.

  • Username: Enter the name of the user you created when you Set up your MySQL Source.

  • Password: Enter the password associated with the specified user name.

  • Connect using SSL: Select if connecting to the source database using SSL. See the detailed instructions below.

  • Source connection name: Enter a descriptive name, such as MySQLConnection1.

  • How would you like to handle schema changes?: choose the option appropriate for your workflow.

    • Do not propagate changes and continue (default): Striim will take no action. Any data added to new tables will not be synced to Databricks. Any data added to a new column will not be synced to Databricks as the column will not exist in the target. Tables dropped from the source will continue to exist in Databricks.

    • Pause the pipeline: Striim will pause the pipeline. After making any necessary changes in the source or Databricks, restart the pipeline.

    • Propagate changes to Databricks: In Databricks, Striim will create a new table, add a column, or drop a table so that the target matches the source. Sync will continue without interruption. (Note that if a column is dropped from a source table, it will not be dropped from the corresponding Databricks target table.)

Use SSL with on-premise MySQL or Cloud SQL for MySQL
  1. Get an SSL certificate in .pem format from your database administrator.

  2. Import the certificate into a custom Java truststore file:

    keytool -importcert -alias MySQLServerCACert -file server-ca.pem \
      -keystore truststore.jks -storepass mypassword 
  3. Convert client keys/certificate files to PKCS#12:

    openssl pkcs12 -export -in client-cert.pem -inkeyclient-key.pem \
      -name “mysqlclient” -passoutpass:mypassword -out client-keystore.p12
  4. Create a Java Keystore using the client-keystore.p12 file:

    keytool -importkeystore -srckeystore client-keystore.p12-srcstoretype pkcs12 \
      -srcstorepass mypassword-destkeystore keystore.jks \
      -deststoretype JKS-deststorepass mypassword
  5. Set these properties in Striim:

    • Verify server certificate: Enable if you want Striim to verify all the following certificates while establishing the connection.

    • Trust certificate keystore URL: upload the truststore.jks file created in step 3

    • Trust certificate keystore type: enter the store type you specified in step 3

    • Trust certificate keystore password: enter the password you specified in step 3

    • Client certificate keystore URL: upload the keystore.jks file created in step 4

    • Client certificate keystore type: enter the store type you specified in step 4

    • Client certificate keystore password: enter the password you specified in step 4

Use SSL with Amazon Aurora or RDS for MySQL
  1. Download the appropriate .pem file from AWS > Documentation > Amazon Relational Database Service (RDS) > User Guide > Using SSL/TLS to encrypt a connection to a DB instance.

  2. Create the truststore.jks file (replace <file name> with the name of the file you downloaded):

    keytool -importcert -alias MySQLServerCACert -file <file name>.pem \
      -keystore truststore.jks -storepass mypassword 
  3. Convert client keys/certificate files to PKCS#12:

    openssl pkcs12 -export -in client-cert.pem -inkeyclient-key.pem \
      -name “mysqlclient” -passoutpass:mypassword -out client-keystore.p12
  4. Set these properties in Striim:

    • Verify server certificate: Enable if you want Striim to verify all the following certificates while establishing the connection.

    • Trust certificate keystore URL: upload the truststore.jks file created in step 3

    • Trust certificate keystore type: enter the store type you specified in step 3

    • Trust certificate keystore password: enter the password you specified in step 3

Use SSL with Azure Database for MySQL
  1. Download the certificate .pem file from Learn > Azure > MySQL > Configure SSL connectivity in your application to securely connect to Azure Database for MySQL > Step 1: Obtain SSL certificate.

  2. Create the truststore.jks file (replace <file name> with the name of the file you downloaded):

    keytool -importcert -alias MySQLServerCACert -file <file name>.pem \
      -keystore truststore.jks -storepass mypassword 
  3. Convert client keys/certificate files to PKCS#12:

    openssl pkcs12 -export -in client-cert.pem -inkeyclient-key.pem \
      -name “mysqlclient” -passoutpass:mypassword -out client-keystore.p12
  4. Set these properties in Striim:

    • Verify server certificate: Enable if you want Striim to verify all the following certificates while establishing the connection.

    • Trust certificate keystore URL: upload the truststore.jks file created in step 3

    • Trust certificate keystore type: enter the store type you specified in step 3

    • Trust certificate keystore password: enter the password you specified in step 3