cypher-shell的使用
1.容器部署的需要登录到容器才能执行如下命令:
docker exec -ti neo4j /bin/bash
cd /var/lib/neo4j/bin
./cypher-shell -a bolt://localhost:7687 -u neo4j -p neo4j123 --encryption false
neo4j@neo4j> show databases;
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name | type | aliases | access | address | role | writer | requestedStatus | currentStatus | statusMessage | default | home | constituents |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "neo4j" | "standard" | [] | "read-write" | "localhost:7687" | "primary" | TRUE | "online" | "online" | "" | TRUE | TRUE | [] |
| "system" | "system" | [] | "read-write" | "localhost:7687" | "primary" | TRUE | "online" | "online" | "" | FALSE | FALSE | [] |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows
ready to start consuming query after 732 ms, results consumed after another 6 ms
:exit;
2.非docker部署的 执行如下命令
[root@localhost bin]# cd /opt/neo4j/bin
./cypher-shell -a bolt://192.168.1.100:7687 -u neo4j -p neo4j123 --encryption false
:exit;