I'm trying to create a .bat batch file to create the database and then retrieve inaccuracies via sql file, follow the .bat file procedure:
@echo off
cls
@echo.
@echo Instalando DB
cd C:\Program Files\MySQL\MySQL Server 5.6\bin\
mysql.exe -u root -proot CREATE DATABASE BDNAME
mysql.exe BDNAME < C:\Users\BD.sql
pause
The problem is that the code only logs into MYSQL in the shell and does not perform the other procedures, how can I fix this or do it otherwise?