Database port number

Updates default.py so that if user selects a different database, the port number will change. (Second commit corrects an error in the first.)