mercredi 31 décembre 2014

Running MySQL via DOS Batch File - Rougue Character


Vote count:

0




I am having a few issues trying to run the following MySQL from a DOS Batch File.


I have created a batch file called restore_database.bat that contains list line...



C:\wamp\mysql\bin\mysql --user=root --password=abc123456 mydatabase < C:\Temp\mydatabase.sql


Now when I run restore_database.bat, a cmd window opens up and the command is showing on the screen and is executed. However the command is slightly different that what is writing in the batch file. I am getting a rouge space plus a 0 (Zero) appearing in the statement. eg



C:\Users\Peter\Documents\Server Scripts>restore_database.bat

C:\Users\Peter\Documents\Server Scripts>C:\wamp\mysql\bin\mysql --user=root --password=abc123456 mydatabase **0**< C:\Temp\mydatabase.sql


ie, after mydatabase I am getting an extra space and a 0 being inserted.


How can I correct this and why is it appearing.


I am using Win7 64bit Ultimate as my OS


Thank you


Peter



asked 28 secs ago







Running MySQL via DOS Batch File - Rougue Character

Aucun commentaire:

Enregistrer un commentaire