I am simply trying to execute an SQL file to create a database in mySql. Whenever I try using either of the code snippets below however, I always get errors.
When I try using this:
nsExec::ExecToLog 'cmd /C "$mySQLEXE" -uroot -p$databaseLoginPass < "$databaseConfigFile"'(Where $mySQLEXE is the path to the mysql.exe file, $databasepass is the root user password, and $databaseConfigFile is the full path to the SQL file.)
I get the error: 'C:\Program' is not recognized as an internal or external command,operable program or batch file. I have doubled checked all the paths and the database password, and everything is correct.
When I try using this:
nsExec::ExecToLog '"cmd /C "$mySQLEXE" -uroot -p$databaseLoginPass < "$databaseConfigFile""'I don't get an error, but no database is created.
If anybody knows what is going on please let me know.
Thanks!