I once had this working but I have misplaced the exact procedure. It was a short one or two line sequence that ran at the front of an install script that created an empty database ready to be loaded.

The first line allowed input of the DB name and the second created the empty DB inside the correct folder. The only prerequisite is the collation format is preferred to use Latin1_swedish_ci. The rest of the field loading and parameters is done later in the script but it assumes the empty DB is already there.

It is a lot faster to do during the creation script than to use PHPMyAdmin or similar to create the DB then exiting to run the other script to load the tables.Unfortunately, I have not used this is a couple years and do not remember the exact sequence to get it to work but I do remember it took quite a while to find the right setup to run from inside a batch file even though the task itself is rather simple.