Mysql fixes (fixes #14883)