Corrections for mysql. Still not work on python3