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:
commit
9da9acde52
@ -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");
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user