Checks the MySQL root password is correct and allows reentry of password.
This commit is contained in:
parent
401aba3fe1
commit
bf79cbbcad
16
installer.pl
16
installer.pl
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue