I am new in Mysql so excuse me for missing some relevant points during the explanation. Well, I would like to create some scripts.sql and then just call them by another main script to setup a database. Example:
- script1.sql
- script2.sql
- script3.sql
Inside script_main.sql I would like to do the following code:
SELECT @scripts_path := 'C:\where\my\scripts\are';
SOURCE @scripts_path + '\script1.sql';
SOURCE @scripts_path + '\script2.sql';
SOURCE @scripts_path + '\script2.sql';
However, seems like I am declaring the scripts_path wrongly because it is returning:
C:wheremyscriptsare
Without slashes. I am wondering if there is some specif command to handle paths variables properly in mysql. I know I can use environment variables, but if there is no option I have to go with it.