fixed logic of whether MySQL database exists already