Fix some MYSQL connection problems