Set up database access.