Configuration File
You can save configuration settings for MySQL remoting in a config file. The file must be structured in the INI file format. Specify this file with the -f command-line option. The config file can have the following sections:
[mysqld]
In the mysqld section, use the following properties to configure the MySQL daemon:
Name | Description | |
port | The port number to use to listen for TCP/IP connections. The default port is 3306. | |
max-connections | The maximum number of allowed TCP/IP connections. 25 is the default. | |
session-timeout | The session timeout time in seconds. The default timeout is 20 seconds. | |
logfile | The full path of the log file. | |
verbosity | The verbosity of the log. 1 is informational. Levels up to 5 add the following subsequent details: (2) HTTP headers, (3) the HTTP body, (4) transport-level communication including SSL, and (5) interface commands and other data source communication. | |
logrotationscheme | The interval at which to truncate the logs. The options are 1 (daily in the format [MyFileName]_2016_3_21.txt), 2 (weekly in the format [MyFileName]_Week_5.txt, where 5 is the fifth week in the year), and 3 (monthly in the format [MyFileName]_2016_3_21.txt).
The default is 2. | |
ssl-cert | The path to the SSL certificate. | |
ssl-subject | The subject of the SSL certificate. | |
ssl-password | The password of the SSL certificate. |
[databases]
In the databases section, define keys that map the MySQL database to SAP Ariba connection strings. Clients connect to the MySQL database defined here. To connect to SAP Ariba, the driver uses the connection string that corresponds to this key.
[databases] SAPAribaSource = "API=SupplierDataAPIWithPagination-V4;APIKey=wWVLn7WTAXrIRMAzZ6VnuEj7Ekot5jnU;Environment=SANDBOX;Realm=testRealm;AuthScheme=OAuthClient;InitiateOAuth=GETANDREFRESH;OAuthClientId=testClient;OAuthClientSecret=testClientSecret;"
[users]
In the users section, define the usernames and passwords of the users of the server. If the acl section is not defined, all users have access to all databases.
[mysql_vars]
In the mysql_vars section, define system variables for the MySQL server. The standard variables are supported. Below are several examples:
Name | Description | |
version_comment | This value is hard-coded as CData JDBC Driver for SAP Ariba (MySQL Remoting). | |
character_set_client | The character_set used in statements sent by the client. |
[acl]
In the acl section, allow users to access SAP Ariba databases. Databases must be defined in the databases section. Users must be defined in the users section. Use commas to separate users authorized to access the specified database.
Example Config File
Below is an example config file. The example includes all properties required to configure the server. It also shows how to configure access control for several users and SAP Ariba instances.
[mysqld] port = 3306 max-connections = 25 session-timeout = 20 logfile = SAPAribaSourceRemotingLog.txt verbosity = 2 ssl-cert = "CData.JDBC.SAPAribaSource.Remoting.pfx" ssl-subject = <subject> ssl-password = <password> [databases] SAPAribaSource = "API=SupplierDataAPIWithPagination-V4;APIKey=wWVLn7WTAXrIRMAzZ6VnuEj7Ekot5jnU;Environment=SANDBOX;Realm=testRealm;AuthScheme=OAuthClient;InitiateOAuth=GETANDREFRESH;OAuthClientId=testClient;OAuthClientSecret=testClientSecret;" SAPAribaSource_ReadOnly = "API=SupplierDataAPIWithPagination-V4;APIKey=wWVLn7WTAXrIRMAzZ6VnuEj7Ekot5jnU;Environment=SANDBOX;Realm=testRealm;AuthScheme=OAuthClient;InitiateOAuth=GETANDREFRESH;OAuthClientId=testClient;OAuthClientSecret=testClientSecret;ReadOnly=True" [users] root = <password> test = <password> [mysql_vars] version_comment = "CData JDBC Driver for SAP Ariba (MySQL Remoting)" [acl] SAPAribaSource = root SAPAribaSource_ReadOnly = root, test
You can further restrict the allowed options by passing in options on the command line. See CLI Options for more information.