~~~~~File: init_database_tables.sql~~~~~~~~~
source create_database_mydatabase.sql;
source create_table_users.sql;
source create_table_authorities.sql;
source create_table_UserConnection.sql;
source create_table_persistent_logins.sql;
~~~~~End file: init_database_tables.sql~~~~~
As you can see,
init_database_tables.sql
delegates to other SQL script files located in the same directory as init_database_tables.sql
. These other scripts actually do the work of bootstrapping my database. When I open
init_database_tables.sql
in HeidiSQL ("Tools" -> "Load SQL File...") and then try to execute it (blue arrow button "Execute SQL..."), I get the following error message"SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'source create_database_geeshenk.sql' at line 1"
When instead of running
init_database_tables.sql
I run the scripts one by one from within HeidiSQL, everything works fine.My gut feeling is that HeidiSQL/Mysql is trying to source the scripts from the wrong working directory ("cwd"). Is there a way to specify the working directory for MySQL scripts to run inside of HeidiSQL?