2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Merge pull request #1435 from cxhong/1413

Add mysql user to localhost account
This commit is contained in:
Pat Lundgren 2016-06-29 14:08:42 -04:00 committed by GitHub
commit 9da9acde52

View File

@ -914,6 +914,7 @@ sub initmysqldb
exit(1);
}
}
#-----------------------------------------------------------------------------
@ -1213,6 +1214,14 @@ sub setupxcatdb
$grantall .= "\'";
$grantall .= " IDENTIFIED BY \'$::adminpassword\';\r";
#GRAND user xcatadmin to localhost account
my $grantall_localhost= "";
$grantall_localhost = "GRANT ALL on xcatdb.* TO xcatadmin@";
$grantall_localhost .= "\'";
$grantall_localhost .= "localhost";
$grantall_localhost .= "\'";
$grantall_localhost .= " IDENTIFIED BY \'$::adminpassword\';\r";
#
# -re $pwd_prompt
# Enter the password for root
@ -1279,6 +1288,8 @@ sub setupxcatdb
$mysql->clear_accum();
$mysql->send("$grantall");
$mysql->clear_accum();
$mysql->send("$grantall_localhost");
$mysql->clear_accum();
$mysql->send("exit;\r");
}