/scripts/optimize_eximstats SHOULD BE changed !

prixone

Well-Known Member
Mar 4, 2004
111
3
168
cPanel Access Level
Root Administrator
hi,

the changes are:
my $dbpassword = cPScript::cPanelFunctions::getmydbpass('root'); #read from /root/.my.cnf
to:
my $dbpassword = cPScript::cPanelFunctions::getmydbpass('root'); #read from /root/.my.cnf
my $dbhost = cPScript::cPanelFunctions::getmydbhost('root') || 'localhost'; #read from /root/.my.cnf
and this:
my $dbh = DBI->connect( 'DBI:mysql:mysql:localhost', 'root', $dbpassword );
to:
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.