Mysql connection fixing