山东省住房和建设网站,wordpress3教程,菜鸟如何建网站,高级的网站建设安装win版本的neo4j 写在最前面安装 win版本的neo4j1. 安装JDK2.下载配置环境变量#xff08;也可选择直接点击快捷方式#xff0c;就可以不用配环境了#xff09;3. 启动neo4j 测试代码遇到的问题及解决#xff08;每次环境都太离谱了#xff0c;各种问题#xff09;连接… 安装win版本的neo4j 写在最前面安装 win版本的neo4j1. 安装JDK2.下载配置环境变量也可选择直接点击快捷方式就可以不用配环境了3. 启动neo4j 测试代码遇到的问题及解决每次环境都太离谱了各种问题连接后更新密码This DBMS cant be found at the moment, it might be located in a location that is currently not connected to this device.还有 ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the fail问题neo4j desktop 重装后数据库出现感叹号测试代码报错 写在最前面
谁能想到最后还是学知识图谱了呢真是啥都要学啊躲不过~
参考https://blog.csdn.net/qq_38335648/article/details/115027676
安装 win版本的neo4j
Neo4j是一个高性能的NOSQL图形数据库它将结构化数据存储在网络上而不是表中。由于知识图谱中存在大量的关系型信息实体—关系—实体, 使用结构化数据库进行存储将产生大量的冗余存储信息, 因此将图数据库作为知识图谱的存储容器成为流行的选择。当前较为常用的图数据库主要有 Neo4j 等。
1. 安装JDK
下载neo4j之前首先要安装JDK。 相信大家已经安装了hhh没安装可参考https://blog.csdn.net/qq_38335648/article/details/115027676
2.下载
下载地址https://neo4j.com/download-center/ 下载好之后直接解压到合适的路径就可以了无需安装。
配置环境变量也可选择直接点击快捷方式就可以不用配环境了
接下来要配置环境变量了与刚才JAVA环境变量的配置方法极为相似因此在这里只进行简单描述。
在系统变量区域新建环境变量命名为NEO4J_HOME变量值设置为刚才neo4j的安装路径。 编辑系统变量区的Path点击新建然后输入 %NEO4J_HOME%\bin最后点击确定进行保存就可以了。
3. 启动neo4j
以管理员身份运行cmd。 在命令行处输入neo4j.bat console
如出现此界面则证明neo4j启动成功。 在浏览器中输入界面中给出的网址http://localhost:7474/,则会显示如下界面。
默认的用户名和密码均为neo4j。 不过建议新建一个project原来的那个project遇到各种各样的报错。。。 新建要求密码至少8个字符
登录之后就可以进行下一步的学习使用啦 至此neo4j安装完毕 O(∩_∩)O 测试代码
代码运行前记得把相应的project start
from py2neo import Graph, Node, Relationship# Graph()中第一个为local host链接name为指定数据库名称auth为认证包含 usernameneo4j 和 password12345678注意改成自己的
graph Graph(http://localhost:7474, auth (neo4j, 12345678), nameneo4j)a Node(hero, nameClint) # Node(label, name)
b Node(hero, nameNatasha)
ab Relationship(a, friend, b)
graph.create(ab) # 创建节点和关系没有报错且显示下图就成功啦
遇到的问题及解决每次环境都太离谱了各种问题
参考https://blog.csdn.net/JD_Wang0/article/details/104408190
连接后更新密码
测试出现访问Neo4j验证失败The client is unauthorized due to authentication failure.
参考:https://blog.csdn.net/weixin_39198406/article/details/85068102
解决方法修改neo4j.conf配置文件取消验证机制修改如下 dbms.security.auth_enabledfalse
This DBMS can’t be found at the moment, it might be located in a location that is currently not connected to this device.
还有 ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the fail
建议重装官网都没有回答 但注意卸载前删除所有缓存文件 一般缓存文件在用户目录下
问题neo4j desktop 重装后数据库出现感叹号 解决新建project以重设密码 或参考https://blog.csdn.net/qq_34045989/article/details/115458261
测试代码报错
py2neo.errors.ProtocolError: Cannot decode response content as JSON
解决方法 之前的代码
g Graph(http://localhost:7474//browser)连接时指定数据库名称使用下面的的连接方式
g Graph(http://localhost:7474//browser, nameneo4j)参考https://blog.csdn.net/qq_23044461/article/details/127879715