hi,
the changes are:
this will read the /root/.my.cnf for password and mysqlserver ip so it will use localhost only when this does not exist.
the changes are:
to:my $dbpassword = cPScript::cPanelFunctions::getmydbpass('root'); #read from /root/.my.cnf
and this:my $dbpassword = cPScript::cPanelFunctions::getmydbpass('root'); #read from /root/.my.cnf
my $dbhost = cPScript::cPanelFunctions::getmydbhost('root') || 'localhost'; #read from /root/.my.cnf
to:my $dbh = DBI->connect( 'DBI:mysql:mysql:localhost', 'root', $dbpassword );
my $dbh = DBI->connect( "DBI:mysql:mysql:$dbhost", 'root', $dbpassword );
this will read the /root/.my.cnf for password and mysqlserver ip so it will use localhost only when this does not exist.