trying to connect to database first.