Update to MySQL interface

This is an update to the MySQL interface after it was briefly tested.