Skip to content

Commit

Permalink
Dont run mysql_config_editor if settings already on
Browse files Browse the repository at this point in the history
  • Loading branch information
marjoripomarole committed May 11, 2016
1 parent 66c54d1 commit aeddae2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extra/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ PWD="ctf"
CODE_PATH=${1:-/vagrant}

echo "[+] Starting tests setup in $CODE_PATH"
# mysql_config_editor set --login-path=local --host=localhost --user="root" --password

if ! [[ $(mysql_config_editor print --login-path=local) ]]; then
mysql_config_editor set --login-path=local --host=localhost --user="root" --password
fi

mysql --login-path=local -e "CREATE DATABASE $DB;"
mysql --login-path=local -e "CREATE USER '$USER'@'localhost' IDENTIFIED BY '$PWD';"
mysql --login-path=local -e "GRANT ALL ON $DB.* TO '$USER'@'localhost';"
Expand Down

0 comments on commit aeddae2

Please sign in to comment.