File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 66 ip-address =
77
88[mysql]
9- client -host = localhost
9+ grant -host = localhost
1010 db-name = false
1111 db-user = false
1212
Original file line number Diff line number Diff line change 4646fi
4747
4848# Find out MySQL client-host to setup grants
49- if [ -z $( $EE_CONFIG_GET mysql.client -host) ]; then
50- readonly EE_MYSQL_CLIENT_HOST =localhost
49+ if [ -z $( $EE_CONFIG_GET mysql.grant -host) ]; then
50+ readonly EE_MYSQL_GRANT_HOST =localhost
5151else
52- readonly EE_MYSQL_CLIENT_HOST =$( $EE_CONFIG_GET mysql.client -host)
52+ readonly EE_MYSQL_GRANT_HOST =$( $EE_CONFIG_GET mysql.grant -host)
5353fi
Original file line number Diff line number Diff line change @@ -51,16 +51,16 @@ function ee_mod_setup_database()
5151 fi
5252
5353 # Create MySQL database
54- echo -e " EE_DB_NAME = $EE_DB_NAME \nEE_DB_USER = $EE_DB_USER \nEE_DB_PASS = $EE_DB_PASS \nEE_MYSQL_HOST = $EE_MYSQL_HOST \nEE_MYSQL_CLIENT_HOST = $EE_MYSQL_CLIENT_HOST " & >> $EE_COMMAND_LOG
54+ echo -e " EE_DB_NAME = $EE_DB_NAME \nEE_DB_USER = $EE_DB_USER \nEE_DB_PASS = $EE_DB_PASS \nEE_MYSQL_HOST = $EE_MYSQL_HOST \nEE_MYSQL_GRANT_HOST = $EE_MYSQL_GRANT_HOST " & >> $EE_COMMAND_LOG
5555 mysql -e " create database \` $EE_DB_NAME \` " \
5656 || ee_lib_error " Unable to create $EE_DB_NAME database, exit status = " $?
5757
5858 # Create MySQL User
59- mysql -e " create user '$EE_DB_USER '@'$EE_MYSQL_CLIENT_HOST ' identified by '$EE_DB_PASS '" \
59+ mysql -e " create user '$EE_DB_USER '@'$EE_MYSQL_GRANT_HOST ' identified by '$EE_DB_PASS '" \
6060 || ee_lib_error " Unable to create $EE_DB_USER database user, exit status = " $?
6161
6262 # Grant permission
63- mysql -e " grant all privileges on \` $EE_DB_NAME \` .* to '$EE_DB_USER '@'$EE_MYSQL_CLIENT_HOST '" \
63+ mysql -e " grant all privileges on \` $EE_DB_NAME \` .* to '$EE_DB_USER '@'$EE_MYSQL_GRANT_HOST '" \
6464 || ee_lib_error " Unable to grant privileges for $EE_DB_USER database user, exit status = " $?
6565 mysql -e " flush privileges"
6666}
You can’t perform that action at this time.
0 commit comments