Fix mysql compatibility