Connect to an instance using Cypher Shell
This topic describes how to connect to and manage a Graph Database (GDB) instance using Cypher Shell.
Prerequisites
Before you connect to an instance, make sure that the following prerequisites are met:
If you connect from the internet, a public endpoint is required. If you connect from an ECS instance, the ECS instance and the GDB instance must be in the same Virtual Private Cloud (VPC).
Make sure that your IP address has been added to the Graph Database (GDB) whitelist.
Procedure
Cypher Shell requires a Java runtime environment. Install Java 8.
sudo yum install java-1.8.0-develDownload Cypher Shell from the official Neo4j website. Use version 4.0.5 or earlier.
Run the following command to start Cypher Shell and connect to the GDB instance.
Replace ${your_gdb_endpoint} with the endpoint of your GDB instance in the
domain name:portformat. You can find the private and public endpoints and ports on the Basic Information page of the Graph Database console.Replace ${username} with the username of your GDB instance.
Replace ${password} with the password of your GDB instance.
./cypher-shell -a bolt://${your_gdb_endpoint} -u ${username} -p ${password} --encryption falseAt the Cypher Shell prompt, you can run Cypher query statements. Each query statement must end with a semicolon (;).
Run the following command to exit Cypher Shell.
:exit