Hello there, I was wondering whether the following command (from a .bat script):
(1) connects to the mysql instance once and then executes script#1 followed by script#2, or (2) does it reconnect for each of the sql scripts?
mysql -B -b -h%HOST% -u%USER% -p%PASSWORD% %SCHEMA% < "scripts\create_and_populate.sql" < "scripts\update_joomla_article.sql"
I have a bad feeling it reconnects. If so, how would I go about changing the .bat script to execute one sql script after another without reconnecting. Cheers :)
Edit:
I only found out recently, to my great shame :-Z, that this command does not actually work as I expected.
mysql ... < script1 < script2 < script3
appeared to work at first, until I spotted that only the last script in the chain is actually executed. Still, I will welcome any suggestions as to How to get this done in a different way that what Colin Pickard suggested.