2016-04-30 32 views
3

隨着neo4j 2.3.x社區版我用來設置本地主機的IP地址,並更改端口以允許多個實例進行開發。Neo4j 3.0設置問題

#org.neo4j.server.webserver.address=0.0.0.0 
org.neo4j.server.webserver.port=7384 

在啓動實例時,我使用了一個帶有ip和port的確認消息。

Starting Neo4j Server...WARNING: not changing user 
process [28531]... waiting for server to be ready........ OK. 
http://localhost:7384/ is ready. 

然後我會使用shell腳本和cypher命令上傳數據。

$neo/bin/neo4j-shell -path $neo/data/graph.db -file upload.cypher 

隨着neo4j 3.0,服務器設置略有變化。我打開了HTTP連接,CSV導入和shell連接。

dbms.connector.http.enabled=true 
dbms.connector.http.address=localhost:7384 

dbms.shell.enabled=true 
# dbms.shell.host=127.0.0.1 
dbms.shell.port=1387 

當我啓動實例時,出現以下消息,其中端口不正確。

Starting Neo4j. 
Started neo4j (pid 28718). By default, it is available at http://localhost:7474/ 
There may be a short delay until the server is ready. 

具有相同的shell腳本爲Neo4j的-2.3.x版本上傳數據工作得很好,沒有錯誤消息,我可以使用的Neo4j殼看到的數據。

./neo4j-3.0.0/bin/neo4j-shell -path neo4j-3.0.0/data/graph.db 

但是,當我連接使用主機和端口,而不是我看到的數據。此外,當我使用網絡界面進行連接時,我也看不到任何數據。

./neo4j-3.0.0/bin/neo4j-shell -host localhost -port 1387 

我的數據庫設置有什麼問題嗎? 謝謝!

回答

1

在3.0中,數據存儲的位置已更改。 2.x使用data/graph.db,在3.0中它默認爲data/databases/graph.db。所以你想改變你的設置腳本爲:

./neo4j-3.0.0/bin/neo4j-shell -path neo4j-3.0.0/data/databases/graph.db 
+0

感謝您的回答。我感到很愚蠢。事實上,在加載時我創建了一個data/graph.db數據庫。 – Pierre