multi-db mysql fixes