Connects to database proper, and stores connection for future access