Fixed typo in config file template.
Numerous fixes to restore MySQL compatibility.