More mysql fixes