I have trying to make GRANT ACCESS
to a MySQL Server user.
I have wrote following command in mybatch.bat
:
@echo off
cd /
c:
set mysql_cmd = "GRANT ALL PRIVILEGES ON mydatabase.* TO 'myuser'@'192.168.1.%' IDENTIFIED BY '123abc' WITH GRANT OPTION;"
mysql --user=root --password=mysql --database=mysql -e %mysql_cmd%
pause
mybatch.bat
Output is :
mysql: option '-e' requires an argument
What am i doing wrong?