Fixing mysql connection