Search code examples
mysqlsqlinno-setupheidisql

Run .sql file with Inno Setup


I am trying to run .sql file using Inno Setup.

[Run]
Filename: "C:\Program Files\HeidiSQL\heidisql.exe"; \
    Parameters: "-u root -p Password -h localhost --execute=""G20 Standard.sql"""; \
    WorkingDir: {app}; StatusMsg: Loading Database; Flags: runhidden

It loads the g20 standard.sql in HeidiSQL, but it's not executing that file. It gives error:

Please specify directory to watch.

I can close this error and execute file manual after.

This error coming from HeidiSQL part as HeidiSQL icon appears in Windows taskbar and I can minimise that fault by clicking on icon.

What could be that I am missing here? As it looks like error coming from HeidiSQL, should I move this question to that market instead?


Solution

  • I do not see any --execute switch in HeidiSQL documentation --- Actually there does not seem to be any way to execute .sql script from HeidiSQL command-line.

    You should use MySQL to execute your .sql: