WebTool::MySQL - Methods for interfacing with the MySQL daemon.
my $mysql = new WebTool::MySQL;
if ($mysql->is_installed() && defined($password)) {
$mysql->change_root_password($password});
}
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.
- 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);
Ryan W. Maple <ryan@guardiandigital.com>
Copyright Guardian Digital, Inc., All Rights Reserved