Neo4j learning record
In these days when finishing medical knowledge map Case code and found Neo4j service each time you need the command line to start, and quite unfriendly to replace the management of the database, so go to the official website to download the Neo4j Desktop, and then step on pit road and thus began a long seek death ...... here the record about the entry map database Neo4j and emerging issues.
Neo4j Profile
Neo4j is representative of common knowledge stored map database, it can be summarized in the figure, rather than on the table, to reduce redundant data storage of structured data storage, easy access. As a high-performance map database, its advantages and application scenarios can refer to this Neo4j Series - Introduction and application scenarios (a) , it has a more comprehensive understanding of (Kankan exactly how good it).
Neo4j install, deploy and test
Basic environment
- Operating System win10
- JDK 1.8
Command line java -version
to see JDK version, if not installed, first go to Oracle's official website to download the Java SE JDK (refer to tutorial ).
Download
the official website to download the latest version of the community, I was under the neo4j-community-3.5.5-windows
version 4.0.0 has now been updated to the
unpacked, the directory structure is as follows Neo4j application
to modify the configuration file
find neo4j.conf modify the configuration files in the conf directory, remove the #
start Neo4j
command line into the bin directory under the extracted directory, run the console command neo4j.bat console
, the following message appears
NOTE: here you can configure the environment variables, adding neo4j bin directory to the PATH environment variable where you can not always cd to the the bin directory.
不要关闭控制台的服务,在浏览器打开http://localhost:7474/
默认用户名和密码都是neo4j,登录后界面如下就成功了。
开启Neo4j服务
将其配置为服务,运行控制台命令neo4j install-service
,而后可以通过neo4j start
启动, neo4j stop
停止。
Neo4j Desktop
由于前面的Neo4j服务每次都命令行方式打开,切换数据库也非常麻烦,需要修改配置文件来更改active datebase,因此安装Neo4j Desktop方便使用。
但是需要注意的是,安装好打开Neo4j Desktop后,会有一步选择数据的存储路径,当你choose完路径之后,疯狂点击confirm都毫无反应,无法进行下一步,非常令人困惑。触及到我的知识盲区.jpg
这里参考Stack Overflow的解决方案。
原因是在选择存储数据的路径时,系统需要WMIC获取逻辑磁盘可用空间的大小,而WMIC未设置环境变量,因此在系统环境变量的PATH里添加C:\Windows\System32\wbem
,完美解决。
而后跟随教程创建本地graph,命名为MedicalGraph。
然而在开启时开始报错,如下
原因是当前服务已被其他进程占用(这里是因为我在命令行打开了neo4j服务,端口7474默认连接了数据库graph.db)解决参考org.neo4j.Kernel.StoreLockException
After closing the service console, open, you can see the information MedicalGraph the
state at this time is running, the next step can begin to build profiles of friends
to sum up
Because there is no before the next Neo4j Desktop, and forget to change the active database configuration file, leading to import two cases of data to a map inside, completely chaotic, spent several hours in vain [bald .jpg] before conducting certain data must be sure to be optimistic about the current database is which! !