Prerequisites
- Download an appropriate MySQL driver from MySQL Community Downloads. Version
8.0.33or later is required. - Generate a
SHA512value, which the will use via an environment variable. To generate the value, follow the process given in Generating the SHA512 value, below.
AWS
- Upload the driver package to an S3 bucket that’s in the same account space as the and accessible by the agent.
- The needs access to the S3 bucket, especially the permission
s3:GetObjectto download the package. - Define the SHA512, S3 bucket, and S3 key values, using the following environment variables:
MYSQL_DRIVER_SHA512MYSQL_DRIVER_S3_BUCKETMYSQL_DRIVER_S3_KEY
- The
MYSQL_DRIVER_S3_BUCKET, andMYSQL_DRIVER_S3_KEYenvironment variables, and their values, need to be provided to launch the agent. - If you are using an AWS-managed MySQL-compatible database as a source for AWS, read the MySQL for AWS documentation in the AWS DMS (Database Migration Service) docs.
Azure
- Upload the driver package to an Azure Blob Storage location that’s in the same resource group as the and accessible by the agent.
- The
Microsoft.Storage/storageAccounts/blobServices/containers/blobs/readpermission is required for the agent to download the driver. For more information, read Get Blob. - Define the SHA512, account name, container name, and Azure Blob name values, using the following environment variables:
MYSQL_DRIVER_SHA512MYSQL_DRIVER_ABS_ACCOUNT_NAMEMYSQL_DRIVER_ABS_CONTAINER_NAMEMYSQL_DRIVER_ABS_BLOB_NAME
- The
MYSQL_DRIVER_ABS_ACCOUNT_NAME,MYSQL_DRIVER_ABS_CONTAINER_NAME, andMYSQL_DRIVER_ABS_BLOB_NAMEenvironment variables, and their values, need to be provided to download the files. The agent will launch only if the files are successfully downloaded. - The installation template will create a managed identity that the uses to authenticate against required Azure resources. When adding a MySQL driver to a storage account, you must also grant the role
Storage Blob Data Contributorto the created managed identity against the storage account that the driver has been placed into.
Generating the SHA512 value
You must set either theMYSQL_DRIVER_SHA512 or the DISABLE_MYSQL_DRIVER_SHA512 environment variable, regardless of the chosen cloud provider. We strongly recommend using the MYSQL_DRIVER_SHA512 variable, and providing the SHA512 value of the driver .jar file you are using. For example:
- It’s not recommended to set the
DISABLE_MYSQL_DRIVER_SHA512variable to “true”, because this means the agent will no longer validate the hash of the driver file. - If a hash is provided in
MYSQL_DRIVER_SHA512, and it doesn’t match the hash of the downloaded file, then the agent won’t start.
SHA512 value, open a terminal window and run the command appropriate to your operating system:
| Operating system | Command |
|---|---|
| Windows | certutil -hashfile "<path-to-file>" SHA512 |
| MacOS | shasum -a 512 <path-to-file> |
| Linux | sha512sum <path-to-file> |
<path-to-file> is the full path and name of the .jar driver file.
