File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,10 +12,13 @@ flyway="$base/tools/flyway-3.2.1/flyway"
1212flyway_sql=" $base /tools/flyway-3.2.1/sql/"
1313
1414mysql --user=$user --password=$password --host=$host --port=$port << EOF
15+ grant usage on *.* to 'root'@'localhost';
16+ grant usage on *.* to 'root'@'%';
1517DROP DATABASE IF EXISTS zstack_ui;
1618CREATE DATABASE zstack_ui;
1719grant all privileges on zstack_ui.* to root@'%' identified by "$password ";
1820grant all privileges on zstack_ui.* to root@'localhost' identified by "$password ";
21+ flush privileges;
1922EOF
2023
2124rm -rf $flyway_sql
3235
3336hostname=` hostname`
3437mysql --user=$user --password=$password --host=$host --port=$port << EOF
35- grant usage on *.* to 'zstack_ui';
36- drop user zstack_ui;
37- create user 'zstack_ui' identified by "$zstack_ui_db_password ";
3838grant usage on *.* to 'zstack_ui'@'localhost';
3939grant usage on *.* to 'zstack_ui'@'%';
40+ drop user zstack_ui;
41+ create user 'zstack_ui' identified by "$zstack_ui_db_password ";
4042grant all privileges on zstack_ui.* to zstack_ui@'localhost' identified by "$zstack_ui_db_password ";
4143grant all privileges on zstack_ui.* to zstack_ui@'%' identified by "$zstack_ui_db_password ";
4244grant all privileges on zstack_ui.* to zstack_ui@"$hostname " identified by "$zstack_ui_db_password ";
You can’t perform that action at this time.
0 commit comments