MysqldResource API includes the following methods:
void start(String threadName, Map
Deploys and starts MySQL. The "threadName" string is used to name the thread which actually performs the execution of the MySQL command line. The map is the set of arguments and their values to be passed to the command line.
Shuts down the MySQL instance managed by the MysqldResource object.
Returns a map of all the options and their current (or default, if not running) options available for the MySQL database.
Returns true if the MySQL database is running.
Returns true once the database reports that is ready for connections.
void setKillDelay(int millis);
The default “Kill Delay” is 30 seconds. This represents the amount of time to wait between the initial request to shutdown and issuing a “force kill” if the database has not shutdown by itself.
void addCompletionListenser(Runnable listener);
Enables applications to be notified when the server process completes. Each “listener” will be fired off in its own thread.
Returns the version of MySQL.
void setVersion(int MajorVersion, int
minorVersion, int patchLevel);
The standard distribution comes with only one version of MySQL packaged. However, it is possible to package multiple versions, and specify which version to use.