在shell下输入以下指令
locate lgraph_cypher.py
找到之后,cd 进入cypher工具所在的文件夹
成功运行lgraph_cypher.py 需要提前安装的Python包
添加国内源
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple prompt_toolkit
记得修改对应的ip以及端口号
127.0.0.1 就是localhost
工具包成功安装之后,调用如下命令可以直接进行cypher查询
./lgraph_cypher.py -u admin -P 73@TuGraph -s "MATCH (n) RETURN n"
-f 可以加cypher文件,而不只是单条查询语句
如果不输入-s -f 会进入交互模式
./lgraph_cypher.py -u admin -P 73@TuGraph
更换图
:use liveJournal
在这种模式下可以直接输入cypher语句进行查询,但要记得末尾的 ;
多行输入cypher语句