Connect to db.