CData Cloud は、クラウドホスト型のソリューションで、複数の標準サービスやプロトコルにまたがるMariaDB へのアクセスを実現します。MySQL またはSQL Server データベースに接続できるアプリケーションであれば、CData Cloud を介してMariaDB に接続できます。
CData Cloud により、他のOData エンドポイントや標準SQL Server / MySQL データベースと同じように、MariaDB への接続を標準化し、構成することができます。
このページでは、CData Cloud でのMariaDB への接続の確立 のガイド、利用可能なリソースに関する情報、および使用可能な接続プロパティのリファレンスについて説明します。
接続の確立 は、CData Cloud にデータベースを作成するためのMariaDB への認証方法と必要な接続プロパティの設定方法について示します。
利用可能な標準サービスを経由してMariaDB からデータにアクセスする方法と、CData Cloud の管理については、CData Cloud ドキュメント で詳しく説明します。
Database タブで対応するアイコンを選択して、MariaDB に接続します。必須プロパティはSettings にリストされています。Advanced タブには、通常は必要ない接続プロパティが表示されます。
Server およびPort プロパティは、MariaDB サーバーに設定してください。オプションとして、Database を特定のデータベースに接続するように設定することができます。設定されていない場合、Cloud はすべてのデータベースのテーブルを報告します。
アクセストークンの期限が切れたときは、Cloud は自動でアクセストークンをリフレッシュします。
LDAP 認証情報はデフォルトで自動検出されます。 別のユーザーとアカウントを指定したい場合は、 以下のオプションプロパティを設定します。
However, you must create a custom OAuth application to connect to MariaDB via the Web. And since custom OAuth applications seamlessly support all three commonly-used auth flows, you might want to create custom OAuth applications (use your own OAuth Application Credentials) for those auth flows anyway.
Custom OAuth applications are useful if you want to:
Specify the desired setup: single-tenant or multi-tenant.
Choose your preferred type of authentication:
If you have selected to use permissions that require admin consent, you may grant them from the current tenant on the Azure Portal's API Permissions page.
デフォルトでは、Cloud はサーバーの証明書をシステムの信頼できる証明書ストアと照合してSSL / TLS のネゴシエーションを試みます。
別の証明書を指定するには、利用可能なフォーマットについてSSLServerCert プロパティを参照してください。
MariaDB Cloud はクライアント証明書の設定もサポートしています。次を設定すれば、クライアント証明書を使って接続できます。
次のプロパティを設定します。
プロパティ | 説明 |
AuthScheme | The scheme used for authentication. Accepted entries are Password, AzureAD, AzurePassword, AzureMSI, and LDAP. |
Server | The host name or IP address of the server. |
Port | The port of the MariaDB server. |
User | 認証で使用されるMariaDB ユーザーアカウント。 |
Password | ユーザーの認証で使用されるパスワード。 |
Database | The name of the MariaDB database. |
Domain | The name of the domain for a Windows (NTLM) security login. |
UseSSL | This field sets whether SSL is enabled. |
NTLMVersion | The NTLM version. |
プロパティ | 説明 |
AzureTenant | データにアクセスするために使用されるMicrosoft Online テナント。指定しない場合は、デフォルトのテナントが使用されます。 |
プロパティ | 説明 |
SSLServerCert | TLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。 |
プロパティ | 説明 |
SSHAuthMode | サービスへのSSH トンネルを確立する際に使用される認証方法。 |
SSHClientCert | SSHUser の認証に使用する証明書。 |
SSHClientCertPassword | SSHClientCert キーのパスワード(ある場合)。 |
SSHClientCertSubject | SSH クライアント証明書のサブジェクト。 |
SSHClientCertType | SSHClientCert 秘密鍵の種類。 |
SSHServer | SSH サーバー。 |
SSHPort | SSH ポート。 |
SSHUser | SSH ユーザー。 |
SSHPassword | SSH パスワード。 |
SSHServerFingerprint | SSH サーバーのフィンガープリント。 |
UseSSH | MariaDB 接続をSSH 経由でトンネリングするかどうか。 SSH を使用します。 |
プロパティ | 説明 |
Verbosity | ログファイルの記述をどの程度の詳細さで記載するかを決定するverbosity レベル。 |
プロパティ | 説明 |
BrowsableSchemas | このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
プロパティ | 説明 |
AllowUserVariables | When set to True, user variables (prefixed by an @) can be used in SQL queries. |
MaxRows | クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。 |
ReplaceInvalidDatesWithNull | 無効な日付をNULL に置き換えるかどうかを決定します。 |
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. |
このセクションでは、本プロバイダーの接続文字列で設定可能なAuthentication プロパティの全リストを提供します。
プロパティ | 説明 |
AuthScheme | The scheme used for authentication. Accepted entries are Password, AzureAD, AzurePassword, AzureMSI, and LDAP. |
Server | The host name or IP address of the server. |
Port | The port of the MariaDB server. |
User | 認証で使用されるMariaDB ユーザーアカウント。 |
Password | ユーザーの認証で使用されるパスワード。 |
Database | The name of the MariaDB database. |
Domain | The name of the domain for a Windows (NTLM) security login. |
UseSSL | This field sets whether SSL is enabled. |
NTLMVersion | The NTLM version. |
The scheme used for authentication. Accepted entries are Password, AzureAD, AzurePassword, AzureMSI, and LDAP.
string
"Password"
The scheme used for authentication. Accepted entries are Password, AzureAD, AzurePassword, AzureMSI, and LDAP.
The host name or IP address of the server.
string
""
The host name or IP of the server hosting the MariaDB database.
The port of the MariaDB server.
string
"3306"
The port of the server hosting the MariaDB database.
認証で使用されるMariaDB ユーザーアカウント。
string
""
このフィールドは、Password とともに、MariaDB サーバーに対して認証をするために使われます。
The name of the MariaDB database.
string
""
The default database to connect to when connecting to the MariaDB 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 MariaDB instance.
This field sets whether SSL is enabled.
bool
true
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.
The NTLM version.
string
"1"
This property specifies the NTLM version to use.
このセクションでは、本プロバイダーの接続文字列で設定可能なAzure Authentication プロパティの全リストを提供します。
プロパティ | 説明 |
AzureTenant | データにアクセスするために使用されるMicrosoft Online テナント。指定しない場合は、デフォルトのテナントが使用されます。 |
データにアクセスするために使用されるMicrosoft Online テナント。指定しない場合は、デフォルトのテナントが使用されます。
string
""
データにアクセスするために使用されるMicrosoft Online テナント。例えば、contoso.onmicrosoft.com です。あるいは、 テナントId を指定します。この値は[Azure ポータル]->[Azure Active Directory]->[プロパティ]のディレクトリId です。
通常、Tenant を指定する必要はありません。OAuthGrantType をCODE(デフォルト)に設定している場合は、Microsoft が自動的に決定します。 ただし、ユーザーがマルチテナントに所属している場合は失敗する可能性があります。 例えば、ドメインA の管理者がドメインB のユーザーをゲストユーザーとして招待した場合。ユーザーは両方のテナントに属していることになります。 Tenant を指定するのはグッドプラクティスですが、一般的には指定しなくてもうまく動作するはずです。
OAuthGrantType をCLIENT に設定する場合は、AzureTenant が必須です。クライアント資格情報を使用する場合、ユーザーコンテキストはありません。 資格情報は、アプリ自体のコンテキストから取得されます。Microsoft ではTenant を指定せずにクライアント資格情報を取得することを許容していますが、使用する特定のテナントを選択する可能性ははるかに低くなっています。 このため、接続するドメインに適用される資格情報を確実に取得するために、すべてのクライアント資格情報接続に対してAzureTenant を明示的に指定する必要があります。
このセクションでは、本プロバイダーの接続文字列で設定可能なSSL プロパティの全リストを提供します。
プロパティ | 説明 |
SSLServerCert | TLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。 |
TLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。
string
""
TLS/SSL 接続を使用する場合は、このプロパティを使用して、サーバーが受け入れるTLS/SSL 証明書を指定できます。コンピュータによって信頼されていない他の証明書はすべて拒否されます。
このプロパティは、次のフォームを取ります:
説明 | 例 |
フルPEM 証明書(例では省略されています) | -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE----- |
証明書を保有するローカルファイルへのパス。 | C:\cert.cer |
公開鍵(例では省略されています) | -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY----- |
MD5 Thumbprint (hex 値はスペースおよびコロン区切り) | ecadbdda5a1529c58a1e9e09828d70e4 |
SHA1 Thumbprint (hex 値はスペースおよびコロン区切り) | 34a929226ae0819f2ec14b4a3d904f801cbb150d |
これを指定しない場合は、マシンが信用するすべての証明書が受け入れられます。
すべての証明書の受け入れを示すには、'*'を使用します。セキュリティ上の理由から、これはお勧めできません。
このセクションでは、本プロバイダーの接続文字列で設定可能なSSH プロパティの全リストを提供します。
プロパティ | 説明 |
SSHAuthMode | サービスへのSSH トンネルを確立する際に使用される認証方法。 |
SSHClientCert | SSHUser の認証に使用する証明書。 |
SSHClientCertPassword | SSHClientCert キーのパスワード(ある場合)。 |
SSHClientCertSubject | SSH クライアント証明書のサブジェクト。 |
SSHClientCertType | SSHClientCert 秘密鍵の種類。 |
SSHServer | SSH サーバー。 |
SSHPort | SSH ポート。 |
SSHUser | SSH ユーザー。 |
SSHPassword | SSH パスワード。 |
SSHServerFingerprint | SSH サーバーのフィンガープリント。 |
UseSSH | MariaDB 接続をSSH 経由でトンネリングするかどうか。 SSH を使用します。 |
サービスへのSSH トンネルを確立する際に使用される認証方法。
string
"Password"
SSHUser の認証に使用する証明書。
string
""
公開鍵認証を使用するには、SSHClientCert に有効な秘密鍵が含まれている必要があります。 公開鍵はオプションで、含まれていない場合はCloud が秘密鍵から生成します。 Cloud は公開鍵をサーバーに送信し、ユーザーが公開鍵を認証した場合に接続が許可されます。
SSHClientCertType フィールドは、SSHClientCert により指定されたキーストアの種類を指定します。 ストアがパスワードで保護されている場合は、SSHClientCertPassword でパスワードを指定します。
一部の種類のキーストアは、複数のキーを含むことができるコンテナです。 デフォルトでは、Cloud はストアの最初のキーを選択しますが、SSHClientCertSubject を使用して特定のキーを指定することも可能です。
SSHClientCert キーのパスワード(ある場合)。
string
""
このプロパティは、SSHAuthMode がPublicKey に設定され、SSHClientCert が秘密鍵に設定されているSFTP サーバーに認証する場合にのみ使用されます。
SSH クライアント証明書のサブジェクト。
string
"*"
証明書のサブジェクトは、証明書をロードするときにストア内の証明書を検索するために使用されます。
完全に一致するものが見つからない場合、ストアはプロパティの値を含むサブジェクトを検索します。
それでも一致するものが見つからない場合、プロパティは空白で設定され、証明書は選択されません。
"*" に設定すると、証明書ストアの1番目の証明書が選択されます。
証明書のサブジェクトは識別の名前フィールドおよび値のカンマ区切りのリストです。 例えば、"CN=www.server.com, OU=test, C=US, E=support@cdata.com"。共通のフィールドとその説明は以下のとおりです。
フィールド | 説明 |
CN | 共通名。一般的には、www.server.com のようなホスト名です。 |
O | 法人名 |
OU | 法人の部署名 |
L | 法人の住所(市町村名) |
S | 法人の住所(都道府県) |
C | 国名 |
E | Eメールアドレス |
フィールド値にカンマが含まれている場合は、それを引用符で囲む必要があります。
SSHClientCert 秘密鍵の種類。
string
"PEMKEY_FILE"
このプロパティには次の値の1つを設定できます。
種類 | 説明 | 許容されるBlob 値 |
MACHINE/USER | Blob 値はサポートされていません。 | |
JKSFILE/JKSBLOB | base64のみ | |
PFXFILE/PFXBLOB | PKCS12形式(.pfx)のファイル。証明書と秘密鍵の両方を含む必要があります。 | base64のみ |
PEMKEY_FILE/PEMKEY_BLOB | PEM 形式のファイル。RSA、DSA、またはOPENSSH の秘密鍵を含む必要があります。オプションで、秘密鍵と一致する証明書を含むことができます。 | base64またはプレーンテキスト。blob をテキストとして入力する場合、改行をスペースに置き換えることができます。 |
PPKFILE/PPKBLOB | puttygen ツールで作成されたPuTTY 形式の秘密鍵。 | base64のみ |
XMLFILE/XMLBLOB | .NET のRSA クラスによって生成される形式のXML キー:RSA.ToXmlString(true)。 | base64またはプレーンテキスト。 |
SSH サーバー。
string
""
SSH サーバー。
SSH ポート。
string
"22"
SSH ポート。
SSH ユーザー。
string
""
SSH ユーザー。
SSH パスワード。
string
""
SSH パスワード。
SSH サーバーのフィンガープリント。
string
""
SSH サーバーのフィンガープリント。
MariaDB 接続をSSH 経由でトンネリングするかどうか。 SSH を使用します。
bool
false
デフォルトでは、Cloud はMariaDB に直接接続しようとします。 このオプションを有効にすると、Cloud は代わりにSSHServer とのSSH 接続を確立し、その接続を経由してMariaDB への接続をトンネリングします。
このセクションでは、本プロバイダーの接続文字列で設定可能なLogging プロパティの全リストを提供します。
プロパティ | 説明 |
Verbosity | ログファイルの記述をどの程度の詳細さで記載するかを決定するverbosity レベル。 |
このセクションでは、本プロバイダーの接続文字列で設定可能なSchema プロパティの全リストを提供します。
プロパティ | 説明 |
BrowsableSchemas | このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
string
""
スキーマをデータベースからリストすると、負荷がかかる可能性があります。接続文字列でスキーマのリストを提供すると、 パフォーマンスが向上します。
このセクションでは、本プロバイダーの接続文字列で設定可能なMiscellaneous プロパティの全リストを提供します。
プロパティ | 説明 |
AllowUserVariables | When set to True, user variables (prefixed by an @) can be used in SQL queries. |
MaxRows | クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。 |
ReplaceInvalidDatesWithNull | 無効な日付をNULL に置き換えるかどうかを決定します。 |
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.
クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。
int
-1
クエリで集計またはGROUP BY を使用しない場合に返される行数を制限します。これはLIMIT 句よりも優先されます。
無効な日付をNULL に置き換えるかどうかを決定します。
bool
false
無効な日付をNULL に置き換えるかどうかを決定します。つまり、これをtrue に設定すると、無効な日付が見つかっても例外が発生しません。
無効な日付をNULL に置き換えるかどうかを決定します。つまり、これをtrue に設定すると、無効な日付が見つかっても例外が発生しません。
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). When set to LOCAL, the server uses the local timezone and does not apply a timezone conversion.
The value in seconds until the connection timeout error is thrown.
int
30
If the Timeout property is set to 0, the default of 30 seconds will be used instead.
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
false
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 MariaDB. Retrieving such a value may cause parsing errors unless you set this property to True.