mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-21 18:50:28 +00:00
mysqlsetup failed becuase /usr/bin/mysql_install_db is not available (#1702)
* mysqlsetup failed becuase /usr/bin/mysql_install_db is not available * use variable * chang "-e" to "-x"
This commit is contained in:
@@ -916,7 +916,13 @@ sub initmysqldb
|
||||
}
|
||||
else
|
||||
{
|
||||
$cmd = "/usr/bin/mysql_install_db --user=mysql";
|
||||
my $sqlcmd = "/usr/bin/mysql_install_db";
|
||||
if (!(-x ($sqlcmd))) {
|
||||
xCAT::MsgUtils->message("E", "$sqlcmd is not available, please install required mysql/mariadb packages");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$cmd = "$sqlcmd --user=mysql";
|
||||
}
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
|
Reference in New Issue
Block a user