I have dbms.active_database=debug.db set in neo4j.conf (and the new database's data directory was created upon restart), but the Neo4J Browser still connects to graph.db
Related
I have a successful import using the bin/neo4j-admin tool, can see the new database folder in my /databases, have restarted the server, but cannot get the database to appear in the console as an option to switch to. Do you have any suggestions for getting a newly imported database to be available in the console?
I assume that you are referring to the Neo4j Desktop environment.
The Desktop currently seems to be designed to support local DBs created by the Desktop itself.
As a workaround, you can:
Create a new "Graph" in the Desktop, using the "Connect to Remote Graph" option.
Accept the default "bolt://localhost:7687" as the Connect URL (assuming the default is acceptable).
Manually start your local neo4j installation from the command line, and
Click Connect on your "Graph" to connect.
Be aware that the Desktop has fewer bells and whistles for "remote
graphs".
I resolved the issue. The steps I found to successfully import a set of CSV using the admin -import tool is to:
Stop the server
Run the admin -import tool and use --database=aDatabaseName
Start the server
In the console switch to the System database using the pulldown control
Run the following command at the system prompt: create database aDatabaseName
(should be the same name set in #2 above)
Switch to the database just created using the console pulldown control
I was able to see the database nodes and relationships I created following the above steps
This is what worked for me. I was trying to access my database generated through neo4j-admin on my Neo4j Desktop app browser console.
On Neo4j Desktop App open the browser of the database server you want to include the new database
Switch to the system database https://neo4j.com/developer/manage-multiple-databases/
:use system
as system, create the database you want to import
:create database dbname
Stop the server
Use the neo4-admin tool to import the database https://neo4j.com/graphacademy/online-training/v4/19-using-neo4j-admin-tool-import/ (make sure to use the same name --database dbname). Run these command on the terminal opened from the Desktop app under the databases>_Open Terminal. On windows the neo4j-admin.bat is located in the bin directory
start the server and open the neo4j browser and switch to the system database https://neo4j.com/developer/manage-multiple-databases/
:use system
To list all the database available to use as system
:dbs
switch to your imported database
:use dbmame
Your browser console is ready now for your queries.
I am using Neo4j 2.3.2 CE server (not embedded) on Windows 7.
I am experiencing a strange behavior. If I stop and restart the Neo4j server process and start the database with the last used database directory, the demo movie database is shown in the web GUI even though the directory still contains my database. After renaming the directory, and starting the database with the new directory name, my database contents are shown again.
Steps to reproduce:
(1) Start the Neo4j server process
(2) Start the server with an empty directory as database location
(3) In web GUI check that database is empty
(4) In web GUI add some data
(5) Stop server and server process
(6) Start server process
(7) Start server with the same directory as above
(8) Check the database contents > now it contains the movie demo database!
(9) Stop server
(10) Rename the database directory
(11) Start server with the new directory name
(12) The database now contains the data added in (4)
Any one has a solution, or at least an explanation?
Gergely
Check what's in config file.
conf/neo4j-server.properties
org.neo4j.server.database.location=data/graph.db
For the record, here is the solution.
When Neo4j CE is started, the Database Location field contains the last used directory. However this is a trap. The effective database location is the default directory, which is C:\Users\your_user_name\Documents\Neo4j\default.graphdb. You have to click Choose and select the directory again. I had the movie database in this directory, hence the behavior above.
Note: the org.neo4j.server.database.location property of the server configuration file C:\Users\your_user_name\AppData\Roaming\Neo4j Community Edition\neo4j-server.properties seems to be ignored in Neo4j CE.
I am new at NoSQL graphs databases. I am learning Neo4J with Java througth https://spring.io/guides/gs/accessing-data-neo4j/.
How can I see my nodes that I created by Java at the http address http://localhost:7474/browser/ ?
That guide uses an embedded Neo4j instance, which is accessible within the Java application. Specifically, this code:
#Bean
GraphDatabaseService graphDatabaseService() {
return new GraphDatabaseFactory().newEmbeddedDatabase("accessingdataneo4j.db");
}
is creating an embedded Neo4j instance in the current working directory with the name accessingdataneo4j.db. To use the Neo4j Browser you'll need to run Neo4j Server. Follow the instructions here to download and install Neo4j.
If you are using the Mac or Windows desktop application you can select the location for the embedded database your created previously - just point the "Database Location" to the location of accessingdataneo4j.db that you created and start the server. Then you can access the Neo4j Browser at http://localhost:7474
If you are not using the desktop application you can set the location of the database directory in conf/neo4j-server.properties:
org.neo4j.server.database.location=/path/to/accessingdataneo4j.db
I use <neo4j:config storeDirectory="/neo4j/target/data/db"> to config my neo4j database path,
and when tomcat started, the database files are locked by tomcat, and I can't start it using Neo4j official start tool, so how can I access my database in broswer like localhost:7474, or can spring connect a lunched neo4j server like mysql? and then I can access it through broswer.
You can work with one graph instance from one place only. If you are using it via tomcat in your code you wont be able to start it from the community tool. You would need to stop your tomcat and then run the tool to view it in the browser.
I have a Neo4j server running on my machine and access the database via the webadmin interface. Then I run a java application which writes data to the database using the Java API and exists afterwards.
If I then try to see the new data in the webadmin, I have to restart the Neo4j server (refreshing doesn't help).
How can I refresh the webadmin without having to restart the server?