The following batch script produces the error shown below.
@echo off
set MUSER=root
set MPASS=admin
set MHOST=localhost
set DB=test_officebox_admin
set MBIN="C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin"
set scriptpath="C:\Users\unmesh.ghatbandhe\Desktop\testdatasql"
set scriptfile=%scriptpath%\test.sql
cd \
cd %MBIN%
PAUSE
call mysql -u%MUSER% -p%MPASS% -h%MHOST% -D%DB% < %scriptfile%
I do have many scripts in Sql files when I run it manually it executes all scripts after error it executes another script mysql> Source filename.sql
but is not working for batch file. Can you help me to make it executable?