@echo off
cd $MYSQL_PATH\bin

rem set login and password

set DBNAME=$DB_NAME
set PORT=--port=$MYSQL_PORT
set LOGIN=--user=$DB_USER
set PASS=--password=$DB_PASSWORD


@if not "%PASS%" == "" set PASS=-p %PASS%

echo Creating initial access rights for the default user...

mysql %LOGIN% %PASS% %PORT% %DBNAME% < .\rights\add-access-rights.sql

echo Default User account has been successully created with the default Access Rights.

del .\rights /Q /F
rmdir .\rights