2.7. WebTool::MySQL

2.7.1. NAME

WebTool::MySQL - Methods for interfacing with the MySQL daemon.

2.7.2. SYNOPSIS

my $mysql = new WebTool::MySQL;

if ($mysql->is_installed() && defined($password)) {
  $mysql->change_root_password($password});
}

2.7.3. DESCRIPTION

This module contains functions for interfacing with the running MySQL daemon. The WebTool talks to the MySQL daemon via the special 'engarde-maint' MySQL user which has full privileges.

2.7.4. METHODS

is_installed()

Function checks to see if MySQL(checks daemon mysqld) is installed or not, and returns relevant result(true/false).

Example Usage:

if ($mysql->is_installed()) {
  ....
}

change_root_password($)

This function is used to change the password of root in MySQL. It receives a new password as an argument. Changes take effect immediately.

Example usage:

$mysql->change_root_password($new_password);

mysql_connect()

This subroutine is used to connect to MySQL database. It returns database handle as result.

Example Usage:

my $dbh = $mysql->mysql_connect();

mysql_disconnect($)

This subroutine is used to disconnect MySQL DB, it requires DB handle to be passed as argument.

Example Usage:

$mysql->mysql_disconnect($dbh);

2.7.5. AUTHORS

Ryan W. Maple <ryan@guardiandigital.com>

2.7.6. COPYRIGHT AND LICENSE

Copyright Guardian Digital, Inc., All Rights Reserved