Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

MySQL commands not running automatically through batch script

Asmita's profile image Asmita posted 6 years ago in Running SQL scripts Permalink

I'm trying to execute MySQL commands written in .sql file through a batch script. The batch script runs just fine, connecting to MySQL server through HeidiSQL. However, after connecting to the database it just opens the commands of the .sql file in a new query window and stops. It does not execute the commands automatically, I have to press F9 to do so. Is there any way to make the .sql file run the commands automatically when batch script is called through command prompt.

Contents of batch script:

"C:\Program Files\HeidiSQL\heidisql.exe" -d=Dev -n=0 -h=abc -u=user -p=pwd -P=3306 "path\to\Stored_Proc.sql"

Contents of .sql file:

call db_name.Proc_name;

ansgar's profile image ansgar posted 6 years ago Permalink

No, there is no command line parameter to tell HeidiSQL to actually fire the loaded SQL.

Asmita's profile image Asmita posted 6 years ago Permalink

So are you saying that there isn't any way to execute the .sql commands through batch script?

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.