Connection to database(rebuild)