CData Cloud offers access to MySQL across several standard services and protocols, in a cloud-hosted solution. Any application that can connect to a MySQL or SQL Server database can connect to MySQL through CData Cloud.
CData Cloud allows you to standardize and configure connections to MySQL as though it were any other OData endpoint, or standard SQL Server/MySQL database.
This page provides a guide to Establishing a Connection to MySQL in CData Cloud, as well as information on the available resources, and a reference to the available connection properties.
Establishing a Connection shows how to authenticate to MySQL and configure any necessary connection properties to create a database in CData Cloud
Accessing data from MySQL through the available standard services and CData Cloud administration is documented in further details in the CData Cloud Documentation.
Connect to MySQL by selecting the corresponding icon in the Database tab. Required properties are listed under Settings. The Advanced tab lists connection properties that are not typically required.
By default, the Cloud determines user credentials and the NTLM domain automatically, using either the domain of the PC it is running on or the domain used by the machine running the MySQL instance. To discover the user credentials, the Cloud reads the current NTLM user.
If you want to specify a different domain, provide different login credentials, or change the target NTLM version via any or all of the following optional properties:
Your LDAP credentials are auto-detected by default. If you want to designate a different user and account, set the following optional properties:
Parameter | Set To... | Notes | |
Azure AD user | AzureTenant | The Microsoft Online tenant where MySQL is located. | See Note 1. |
AuthScheme | AzureAD | See Note 2. | |
Azure MSI | AzureTenant | The Microsoft Online tenant where MySQL is located. | See Note 1. |
AuthScheme | AzureMSI | Most often used when MySQL is running on an Azure VM. | |
OAuthClientId | Managed identity's client_identity | Required to obtain a token for a managed identity or if the VM has multiple user-assigned managed identities. | |
Azure Password | AuthScheme | AzurePassword | To connect directly using your Azure credentials, specify the User and Password of the account you use to connect to Azure. |
Notes
When OAuthGrantType is set to CODE (the default), AzureTenant is usually not needed unless the user belongs to multiple tenants. When OAuthGrantType is set to CLIENT, AzureTenant is required.
You can connect to a MySQL database hosted on AWS using either IAM roles or EC2 roles.
Set AuthScheme to AwsIAMRoles.
In many situations, it may be preferable to use an IAM role for authentication instead of the direct security credentials of an AWS root user. If you are specifying the AWSAccessKey and AWSSecretKey of an AWS root user, you may not use roles.
To authenticate as an AWS role, set these properties:
Set AuthScheme to AwsEC2Roles.
If you are using the Cloud from an EC2 Instance and have an IAM Role assigned to the instance, you can use the IAM Role to authenticate. Since the Cloud automatically obtains your IAM Role credentials and authenticates with them, it is not necessary to specify AWSAccessKey and AWSSecretKey.
If you are also using an IAM role to authenticate, you must additionally set AWSRoleARN to the Role ARN for the role you want to authenticate with.
The MySQL Cloud now supports IMDSv2. Unlike IMDSv1, the new version requires an authentication token. Endpoints and response are the same in both versions.
In IMDSv2, the MySQL Cloud first attempts to retrieve the IMDSv2 metadata token and then uses it to call AWS metadata endpoints. If it is unable to retrieve the token, the Cloud reverts to IMDSv1.
By default, the Cloud attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store.
To specify another certificate, see the SSLServerCert property for the available formats to do so.
The MySQL Cloud also supports setting client certificates. Set the following to connect using a client certificate.
Set the following properties:
The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider. Click the links for further details.
For more information on establishing a connection, see Establishing a Connection.
Property | Description |
AuthScheme | The scheme used for authentication. Accepted entries are Password, AzureAD, AzurePassword, AzureMSI, AwsIAMRoles, AwsEC2Roles, LDAP. |
Server | The host name or IP address of the server. Supports cluster servers, for example '192.168.0.1,192.168.0.2'. |
Port | The port of the MySQL server. Supports cluster servers, for example: '3306, 3307', the number of the port should match with Servers. |
User | The MySQL user account used to authenticate. |
Password | The password used to authenticate the user. |
Database | The name of the MySQL database. |
Domain | The name of the domain for a Windows (NTLM) security login. |
NTLMVersion | The NTLM version. |
IntegratedUser | The user that is authenticating to the Windows. |
UseSSL | This field sets whether SSL is enabled. |
Property | Description |
AWSAccessKey | Your AWS account access key. This value is accessible from your AWS security credentials page. |
AWSSecretKey | Your AWS account secret key. This value is accessible from your AWS security credentials page. |
AWSRoleARN | The Amazon Resource Name of the role to use when authenticating. |
Property | Description |
AzureTenant | The Microsoft Online tenant being used to access data. If not specified, your default tenant is used. |
Property | Description |
SSLServerCert | The certificate to be accepted from the server when connecting using TLS/SSL. |
Property | Description |
SSHAuthMode | The authentication method used when establishing an SSH Tunnel to the service. |
SSHClientCert | A certificate to be used for authenticating the SSHUser. |
SSHClientCertPassword | The password of the SSHClientCert key if it has one. |
SSHClientCertSubject | The subject of the SSH client certificate. |
SSHClientCertType | The type of SSHClientCert private key. |
SSHServer | The SSH server. |
SSHPort | The SSH port. |
SSHUser | The SSH user. |
SSHPassword | The SSH password. |
SSHServerFingerprint | The SSH server fingerprint. |
UseSSH | Whether to tunnel the MySQL connection over SSH. Use SSH. |
Property | Description |
Verbosity | The verbosity level that determines the amount of detail included in the log file. |
Property | Description |
BrowsableSchemas | This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC. |
Property | Description |
AllowUserVariables | When set to True, user variables (prefixed by an @) can be used in SQL queries. |
Characterset | The default client character set used by the provider. For example, 'utf8'. |
MaxRows | Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses. |
ServerTimeZone | Specify a specific server time zone id of current platform(.Net or Java) by user. |
Timeout | The value in seconds until the connection timeout error is thrown. |
ZeroDatesToNull | Whether or not to return Date and DateTime values consisting of all zeros as NULL. |
This section provides a complete list of the Authentication properties you can configure in the connection string for this provider.
Property | Description |
AuthScheme | The scheme used for authentication. Accepted entries are Password, AzureAD, AzurePassword, AzureMSI, AwsIAMRoles, AwsEC2Roles, LDAP. |
Server | The host name or IP address of the server. Supports cluster servers, for example '192.168.0.1,192.168.0.2'. |
Port | The port of the MySQL server. Supports cluster servers, for example: '3306, 3307', the number of the port should match with Servers. |
User | The MySQL user account used to authenticate. |
Password | The password used to authenticate the user. |
Database | The name of the MySQL database. |
Domain | The name of the domain for a Windows (NTLM) security login. |
NTLMVersion | The NTLM version. |
IntegratedUser | The user that is authenticating to the Windows. |
UseSSL | This field sets whether SSL is enabled. |
The scheme used for authentication. Accepted entries are Password, AzureAD, AzurePassword, AzureMSI, AwsIAMRoles, AwsEC2Roles, LDAP.
string
"Password"
The scheme used for authentication. Accepted entries are Password, AzureAD, AzurePassword, AzureMSI, AwsIAMRoles, AwsEC2Roles, LDAP.
The host name or IP address of the server. Supports cluster servers, for example '192.168.0.1,192.168.0.2'.
string
""
The host name or IP of the server hosting the MySQL database.
The port of the MySQL server. Supports cluster servers, for example: '3306, 3307', the number of the port should match with Servers.
string
"3306"
The port of the server hosting the MySQL database.
The MySQL user account used to authenticate.
string
""
Together with Password, this field is used to authenticate against the MySQL server.
The password used to authenticate the user.
string
""
The User and Password are together used to authenticate with the server.
The name of the MySQL database.
string
""
The default database to connect to when connecting to the MySQL Server. If this is not set, tables from all databases will be returned.
The name of the domain for a Windows (NTLM) security login.
string
""
By default, the Cloud uses the domain of the PC it is running on or the domain used by the machine running the MySQL instance.
The NTLM version.
string
"1"
This property specifies the NTLM version to use.
The user that is authenticating to the Windows.
string
""
The user that is authenticating to the Windows.
This field sets whether SSL is enabled.
bool
false
This field sets whether the Cloud will attempt to negotiate TLS/SSL connections to the server. By default, the Cloud checks the server's certificate against the system's trusted certificate store. To specify another certificate, set SSLServerCert.
This section provides a complete list of the AWS Authentication properties you can configure in the connection string for this provider.
Property | Description |
AWSAccessKey | Your AWS account access key. This value is accessible from your AWS security credentials page. |
AWSSecretKey | Your AWS account secret key. This value is accessible from your AWS security credentials page. |
AWSRoleARN | The Amazon Resource Name of the role to use when authenticating. |
Your AWS account access key. This value is accessible from your AWS security credentials page.
string
""
Your AWS account access key. This value is accessible from your AWS security credentials page:
Your AWS account secret key. This value is accessible from your AWS security credentials page.
string
""
Your AWS account secret key. This value is accessible from your AWS security credentials page:
The Amazon Resource Name of the role to use when authenticating.
string
""
When authenticating outside of AWS, it is common to use a Role for authentication instead of your direct AWS account credentials. Entering the AWSRoleARN will cause the CData Cloud to perform a role based authentication instead of using the AWSAccessKey and AWSSecretKey directly. The AWSAccessKey and AWSSecretKey must still be specified to perform this authentication. You cannot use the credentials of an AWS root user when setting RoleARN. The AWSAccessKey and AWSSecretKey must be those of an IAM user.
This section provides a complete list of the Azure Authentication properties you can configure in the connection string for this provider.
Property | Description |
AzureTenant | The Microsoft Online tenant being used to access data. If not specified, your default tenant is used. |
The Microsoft Online tenant being used to access data. If not specified, your default tenant is used.
string
""
The Microsoft Online tenant being used to access data. For instance, contoso.onmicrosoft.com. Alternatively, specify the tenant Id. This value is the directory Id in the Azure Portal > Azure Active Directory > Properties.
Typically it is not necessary to specify the Tenant. This can be automatically determined by Microsoft when using the OAuthGrantType set to CODE (default). However, it may fail in the case that the user belongs to multiple tenants. For instance, if an Admin of domain A invites a user of domain B to be a guest user. The user will now belong to both tenants. It is a good practice to specify the Tenant, although in general things should normally work without having to specify it.
The AzureTenant is required when setting OAuthGrantType to CLIENT. When using client credentials, there is no user context. The credentials are taken from the context of the app itself. While Microsoft still allows client credentials to be obtained without specifying which Tenant, it has a much lower probability of picking the specific tenant you want to work with. For this reason, we require AzureTenant to be explicitly stated for all client credentials connections to ensure you get credentials that are applicable for the domain you intend to connect to.
This section provides a complete list of the SSL properties you can configure in the connection string for this provider.
Property | Description |
SSLServerCert | The certificate to be accepted from the server when connecting using TLS/SSL. |
The certificate to be accepted from the server when connecting using TLS/SSL.
string
""
If using a TLS/SSL connection, this property can be used to specify the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected.
This property can take the following forms:
Description | Example |
A full PEM Certificate (example shortened for brevity) | -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE----- |
A path to a local file containing the certificate | C:\cert.cer |
The public key (example shortened for brevity) | -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY----- |
The MD5 Thumbprint (hex values can also be either space or colon separated) | ecadbdda5a1529c58a1e9e09828d70e4 |
The SHA1 Thumbprint (hex values can also be either space or colon separated) | 34a929226ae0819f2ec14b4a3d904f801cbb150d |
If not specified, any certificate trusted by the machine is accepted.
Use '*' to signify to accept all certificates. Note that this is not recommended due to security concerns.
This section provides a complete list of the SSH properties you can configure in the connection string for this provider.
Property | Description |
SSHAuthMode | The authentication method used when establishing an SSH Tunnel to the service. |
SSHClientCert | A certificate to be used for authenticating the SSHUser. |
SSHClientCertPassword | The password of the SSHClientCert key if it has one. |
SSHClientCertSubject | The subject of the SSH client certificate. |
SSHClientCertType | The type of SSHClientCert private key. |
SSHServer | The SSH server. |
SSHPort | The SSH port. |
SSHUser | The SSH user. |
SSHPassword | The SSH password. |
SSHServerFingerprint | The SSH server fingerprint. |
UseSSH | Whether to tunnel the MySQL connection over SSH. Use SSH. |
The authentication method used when establishing an SSH Tunnel to the service.
string
"Password"
A certificate to be used for authenticating the SSHUser.
string
""
SSHClientCert must contain a valid private key in order to use public key authentication. A public key is optional, if one is not included then the Cloud generates it from the private key. The Cloud sends the public key to the server and the connection is allowed if the user has authorized the public key.
The SSHClientCertType field specifies the type of the key store specified by SSHClientCert. If the store is password protected, specify the password in SSHClientCertPassword.
Some types of key stores are containers which may include multiple keys. By default the Cloud will select the first key in the store, but you can specify a specific key using SSHClientCertSubject.
The password of the SSHClientCert key if it has one.
string
""
This property is only used when authenticating to SFTP servers with SSHAuthMode set to PublicKey and SSHClientCert set to a private key.
The subject of the SSH client certificate.
string
"*"
When loading a certificate the subject is used to locate the certificate in the store.
If an exact match is not found, the store is searched for subjects containing the value of the property.
If a match is still not found, the property is set to an empty string, and no certificate is selected.
The special value "*" picks the first certificate in the certificate store.
The certificate subject is a comma separated list of distinguished name fields and values. For instance "CN=www.server.com, OU=test, C=US, [email protected]". Common fields and their meanings are displayed below.
Field | Meaning |
CN | Common Name. This is commonly a host name like www.server.com. |
O | Organization |
OU | Organizational Unit |
L | Locality |
S | State |
C | Country |
E | Email Address |
If a field value contains a comma it must be quoted.
The type of SSHClientCert private key.
string
"PEMKEY_FILE"
This property can take one of the following values:
Types | Description | Allowed Blob Values |
MACHINE/USER | Blob values are not supported. | |
JKSFILE/JKSBLOB | base64-only | |
PFXFILE/PFXBLOB | A PKCS12-format (.pfx) file. Must contain both a certificate and a private key. | base64-only |
PEMKEY_FILE/PEMKEY_BLOB | A PEM-format file. Must contain an RSA, DSA, or OPENSSH private key. Can optionally contain a certificate matching the private key. | base64 or plain text. Newlines may be replaced with spaces when providing the blob as text. |
PPKFILE/PPKBLOB | A PuTTY-format private key created using the puttygen tool. | base64-only |
XMLFILE/XMLBLOB | An XML key in the format generated by the .NET RSA class: RSA.ToXmlString(true). | base64 or plain text. |
The SSH server.
string
""
The SSH server.
The SSH port.
string
"22"
The SSH port.
The SSH user.
string
""
The SSH user.
The SSH password.
string
""
The SSH password.
The SSH server fingerprint.
string
""
The SSH server fingerprint.
Whether to tunnel the MySQL connection over SSH. Use SSH.
bool
false
By default the Cloud will attempt to connect directly to MySQL. When this option is enabled, the Cloud will instead establish an SSH connection with the SSHServer and tunnel the connection to MySQL through it.
This section provides a complete list of the Logging properties you can configure in the connection string for this provider.
Property | Description |
Verbosity | The verbosity level that determines the amount of detail included in the log file. |
The verbosity level that determines the amount of detail included in the log file.
string
"1"
The verbosity level determines the amount of detail that the Cloud reports to the Logfile. Verbosity levels from 1 to 5 are supported. These are detailed in the Logging page.
This section provides a complete list of the Schema properties you can configure in the connection string for this provider.
Property | Description |
BrowsableSchemas | This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC. |
This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.
string
""
Listing the schemas from databases can be expensive. Providing a list of schemas in the connection string improves the performance.
This section provides a complete list of the Miscellaneous properties you can configure in the connection string for this provider.
Property | Description |
AllowUserVariables | When set to True, user variables (prefixed by an @) can be used in SQL queries. |
Characterset | The default client character set used by the provider. For example, 'utf8'. |
MaxRows | Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses. |
ServerTimeZone | Specify a specific server time zone id of current platform(.Net or Java) by user. |
Timeout | The value in seconds until the connection timeout error is thrown. |
ZeroDatesToNull | Whether or not to return Date and DateTime values consisting of all zeros as NULL. |
When set to True, user variables (prefixed by an @) can be used in SQL queries.
bool
false
When set to True, user variables (prefixed by an @) can be used in SQL queries. The default behavior is to treat identifiers prefixed with @ as command parameters.
The default client character set used by the provider. For example, 'utf8'.
string
""
By default the client character set is determined from the server's language settings, but you can override that value by setting this option. This can be useful if you need to use a specific encoding or collation in your queries.
Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
int
-1
Limits the number of rows returned when no aggregation or GROUP BY is used in the query. This takes precedence over LIMIT clauses.
Specify a specific server time zone id of current platform(.Net or Java) by user.
string
""
Specify a specific server time zone id of current platform(.Net or Java) by user. When set to LOCAL, we assume the server timezone is the same as local, and don't apply any timezone conversion.
The value in seconds until the connection timeout error is thrown.
int
30
If Timeout is 0, operations do not time out. The operations run until they complete successfully or until they encounter an error condition.
If Timeout expires and the operation is not yet complete, the Cloud throws an exception.
Whether or not to return Date and DateTime values consisting of all zeros as NULL.
bool
true
Whether or not to return Date and DateTime values consisting of all zeros as NULL. A value of all zeros indicates an invalid Date or DateTime value in MySQL. Retrieving such a value may cause parsing errors unless you set this property to True.