Various changes for mysql