Source: https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/sessions/ Documentation version: v5.3.2 # Sessions overview A session is a consecutive series of interactions between a client and the NebulaGraph Database Developer Edition server-side. Sessions maintain the context between queries, which includes information such as session ID, username, client address, the default schema and graph, and time format settings. The following sections cover how sessions are created, used, and closed in NebulaGraph Database Developer Edition. ## Session initiation A session is created when a user logs in to a Graph service in NebulaGraph Database Developer Edition. To successfully establish a session, the user must provide valid credentials, including a username and password. For more information, see [Connect and run your first query](https://dev-docs.nebula-graph.io/v5.3.2/get-started/first-query/). ## Session customization After a session is created, you can customize the session behavior as follows: - Adjust the schema and graph set in the session. - Add or delete parameters that take effect for all queries executed in the session. For more information, see [SESSION SET](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/sessions/set/) and [SESSION RESET](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/sessions/reset/). ## Session termination A session is terminated in the following scenarios: - The logged-in user explicitly closes the session by using [SESSION CLOSE](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/sessions/close/). - The session is killed by the user with the role `ADMIN` by using [KILL SESSION](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/kill/kill-session/). - The session times out after a period of inactivity. - The Graph service is restarted or shut down. Note Apart from the preceding scenarios, the method to terminate a session varies depending on the client tool you are using. For example, when using ngql, you can enter `:exit`, `:quit`, or `:q` to terminate the session. ## More information - [SHOW SESSIONS](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/show/show-sessions/) - [SHOW CURRENT_SESSION](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/show/show-current-session/) - [SHOW CURRENT_SESSION TIME FORMATS](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/show/show-current-session-time-formats/) - [KILL SESSION](https://dev-docs.nebula-graph.io/v5.3.2/database-gql-reference/data-admin/kill/kill-session/)