我试图让GRANT ACCESS
MySQL 服务器用户。
我写了以下命令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
输出是:
mysql: option '-e' requires an argument
我究竟做错了什么?