Command-line Mysql: Need to automatically exit after running a script via the "source" command in DOS
Posted on 2004-04-19
The goal is to make a script as easy as possible for an end user to run because they are very non-technical. They want to be able to quickly run a query I created via a dos prompt (because it uses stored procedures). After the user types in "source c:\myquery.sql", I want it to run, and then exit automatically. Trouble is, there seems to be no way to do this within the source script. In other words, the user will have to remember to type in "exit" when the script completes. Please confirm if there is any way to achieved the automatic exit. It would be great to have MySQL exit back to the .bat file which originally invoked it.
BTW, I am currently assigned to a very low-tech project and a non-functional requirement is to keep config to a minimum for the next person who takes over.