Checks the MySQL root password is correct and allows reentry of password.

This commit is contained in:
tonnesen 2002-07-09 17:58:56 +00:00
parent 401aba3fe1
commit bf79cbbcad
1 changed files with 11 additions and 5 deletions

View File

@ -697,11 +697,17 @@ To allow us to create the koha database please supply the
mysql\'s root users password
|;
print "Enter mysql\'s root users password: ";
chomp($input = <STDIN>);
if ($input) {
$mysqlpass = $input;
my $needpassword=1;
while ($needpassword) {
print "Enter mysql\'s root users password: ";
chomp($input = <STDIN>);
$mysqlpass = $input;
my $result=system("$mysqldir/bin/mysqladmin -u$mysqluser -p$mysqlpass proc > /dev/null 2>&1");
if ($result) {
print "\n\nInvalid password for the MySql root user.\n\n";
} else {
$needpassword=0;
}
}