add lines to change the ZM_DB_USER and ZM_DB_PASS when the user and password are supplied on the command line.

This is neccessary when the regular zm user does not have alter privileges.
This commit is contained in:
Isaac Connor 2013-08-19 11:19:34 -04:00
parent 543a1f2490
commit 34bfcb5e7e
1 changed files with 5 additions and 0 deletions

View File

@ -98,6 +98,11 @@ if ( !GetOptions( 'check'=>\$check, 'freshen'=>\$freshen, 'rename'=>\$rename, 'z
Usage();
}
my $dbh = zmDbConnect();
*ZM_DB_USER = sub { $dbUser } if ZM_DB_USER ne $dbUser;
*ZM_DB_PASS = sub { $dbPass } if ZM_DB_PASS ne $dbPass;
zmDbDisconnect();
if ( ! ($check || $freshen || $rename || $zoneFix || $migrateEvents || $version) )
{
if ( ZM_DYN_DB_VERSION )