Changed database->addr to database->hostname.