Skip to content
Snippets Groups Projects
Commit ddc53f18 authored by Daniel's avatar Daniel
Browse files

WIP: More relaxed make_db script.

parent d3fea97e
Branches
Tags
No related merge requests found
......@@ -50,10 +50,10 @@ function setup_os() {
function install_db() {
if _db_exists ; then
echo -e "\n
A database with with the name `$DATABASE_NAME` exists already.
Call `make drop-$DATABASE_NAME` to delete that database or reconfigure with
A database with with the name '$DATABASE_NAME' exists already.
Call 'make drop-$DATABASE_NAME' to delete that database or reconfigure with
'./configure'."
exit 1
exit 0
fi
sed "s/db_2_0/$DATABASE_NAME/g" "$INSTALL_SQL_FILE" | $SQL
......@@ -82,7 +82,8 @@ function grant() {
for host in ${DATABASE_USER_HOST_LIST//,/ } ; do
$SQL <<EOF
CREATE USER '$DATABASE_USER'@'$host' identified by '$DATABASE_USER_PW';
CREATE USER IF NOT EXISTS
'$DATABASE_USER'@'$host' identified by '$DATABASE_USER_PW';
GRANT USAGE ON *.* TO '$DATABASE_USER'@'$host';
GRANT ALL PRIVILEGES ON *.* TO '$DATABASE_USER'@'$host' WITH GRANT OPTION;
GRANT EXECUTE ON *.* TO '$DATABASE_USER'@'$host';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment