Script/function to (hopefully) connect to the database