Skip to main content

Configure MySQL Database

Virtual Client has dependency components that can be added to a workload or monitor profile to create and configure a MySQL database on the system. The following section illustrates the details for integrating this into the profile.

Preliminaries

Reference the following documentation before proceeding.

Supported Platform/Architectures

  • linux-x64
  • linux-arm64
  • win-x64
  • win-arm64

Profile Component Parameters

The following section describes the parameters used by the individual component in the profile.

ParameterRequiredDescription
ActionYesInforms of action to take on server configuration.
DatabaseNameYesName of database used by the workload.
ScenarioNoName for telemetry purpose. Does not change functionality.

Actions

The following section describes the different options for the 'Action' parameter noted above.

ActionDescription
StartDatabaseServerStarts the MySQL server.
CreateDatabaseCreates a database under <Database Name> in the MySQL server.
RaisedStatementCountIncreases number of statements MySQL can prepare (only recommended for larger VMs).
ConfigureNetworkModifies the configuration file to make MySQL server accessible to the private network of VMs.
CreateUserCreates user access to the server for each client VM in the provided environment layout.

Example

Here is the usage of the dependency by the Sysbench OLTP workload as an example, that uses all three actions to configure the server.

{
"Type": "MySQLServerConfiguration",
"Parameters": {
"Scenario": "StartDatabaseServer",
"Action": "StartServer",
"DatabaseName": "$.Parameters.DatabaseName",
"Role": "Server"
}
},
{
"Type": "MySQLServerConfiguration",
"Parameters": {
"Scenario": "CreateDatabase",
"Action": "CreateDatabase",
"DatabaseName": "$.Parameters.DatabaseName",
"Role": "Server"
}
},
{
"Type": "MySQLServerConfiguration",
"Parameters": {
"Scenario": "RaisedStatementCount",
"Action": "RaisedStatementCount",
"DatabaseName": "$.Parameters.DatabaseName",
"Role": "Server"
}
},
{
"Type": "MySQLServerConfiguration",
"Parameters": {
"Scenario": "ConfigureNetwork",
"Action": "ConfigureNetwork",
"DatabaseName": "$.Parameters.DatabaseName",
"Role": "Server"
}
},
{
"Type": "MySQLServerConfiguration",
"Parameters": {
"Scenario": "CreateUser",
"Action": "CreateUser",
"DatabaseName": "$.Parameters.DatabaseName",
"Role": "Server"
}
}