Fix bug introduced when merging DB code.

introduced in commit:a484bbc42b691621c1a6424e39c7233791efc24e
refs #97
Use "errexit" option to prevent continuing with unexpected behaviour.

refs #97
DB name must be known before sourcing DB-specific files.

Bug introduced in commit:91c472dfc7e96cad57f5f9be72d858049a0c0ca4
refs #97
Long keynames required for DB type.

refs #97
Do not silently ignore the non-matching case.

refs #97
Don't force-start MySQL as this returns an error if already running.

refs #97