Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-01-2020 11:23 AM
For example, I have neo4j Desktop running on my machine that can be accessed by:
http://localhost:7474/browser
This is the project named 'Project' by default, and the database is named 'Graph' by default.
For testing, I want to create another project named 'Project 1' and the database is named 'Graph' be default again. Now , in access the two databases, how to specify which database that I want to connect in browser?
http://localhost:7474/browser
05-01-2020 11:28 AM
Just a slight terminology fix, Neo4j Desktop allows creation of multiple dbms, not databases. Only one can be run at a single time.
If you want to use a single dbms that allows creation and usage of multiple databases simultaneously, then you'll need to launch an instance for 4.0.x from Neo4j Desktop, then switch to the system db and create your other databases:
05-01-2020 01:52 PM
To make it easier, can I install another neo4j instance, which is has nothing to the existing neo4j installation? In such a case, how to connect the two different instances on the same machine? For example, use another port different from '7474'?
My database version is 3.5.2
05-01-2020 03:13 PM
I don't use Neo4j Desktop. The installation is the tar file which I installed on a remote linux.
05-01-2020 04:03 PM
You had mentioned Neo4j Desktop being used in your first post, but I guess you were referring to a remote connection to this instance?
Are we still talking about two instances on the same remote machine? Or are we talking about different instances on different remote machines?
05-01-2020 04:40 PM
Sorry about that. Let's just talk about the possibility of having two Neo4j installations on the same local machine so that I can create two different graph. Hopefully I can use two different ports to refer to each?
OR, the possibility of two different DBMSes on the same neo4j installation so that I can create two different databases. Again on the same local machine.
In both cases, I haven't upgraded to 4.0 version. 3.5.17 only.
05-01-2020 05:10 PM
Yes, you'll need to change the ports of the other instances in their neo4j.conf so as not to conflict.
dbms.connector.bolt.listen_address
dbms.connector.http.listen_address
dbms.connector.https.listen_address
05-01-2020 06:00 PM
That's great to know and thanks.
05-01-2020 06:02 PM
Also make sure you're careful about how you set your heap and pagecache memory settings, since both instances are sharing the same hardware.
05-02-2020 09:40 PM
It's strange that I downloaded the 3.5.17 tar file to my mac, untar it and changed the port configs in the conf/ directory. Then I went to the bin/ and execute:
cd neo4j-community-3.5.17/bin
./neo4j console
It doesn't really execute this version of neo4j, but it still executes my desktop version of neo4j, which is 3.5.12, which is installed in another directory:
/Users/min/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-b719f648-a8e5-4a16-a1af-8174f09ea344/installation-3.5.12
I didn't set a $NEO4J_HOME/bin and how it points to that executable?
05-04-2020 01:29 PM
Is there any particular reason why you're using the console? You would normally start Neo4j with ./neo4j start
, from the bin directory of the instance.
05-04-2020 03:08 PM
I can use the start, but I got the same result. There may be something weird. But for this particular problem, I found that I can create another project in desktop, create a new graph in the new project, and switch to this new project to work on the new graph. The original graph in old project remains intact, which is what i want for testing.
05-06-2020 01:22 AM
Hi @lingvisa
I am curious to know how you are getting on with this?
To my knowledge, and have double checked from the link @andrew.bowman shared. You will have to use 4. 0 above version to run multiple databases, in a single RDBMS.
' Managing Multiple Databases in Neo4j
Goals
In this guide, we will walk through how to manage multiple database within the Neo4j DBMS.
Prerequisites
Please have Neo4j (version 4.0 or later) downloaded and installed.'
I am also interested in setting this up, as in the past (my little experience on windows local host), two related graph database can't be accessed at the same time. One has to be closed before the other one is open.
Hope I am not misleading,
Steven
05-08-2020 11:36 AM
I'm also new to Neo4J. I use the "community edition". My reading of the documentation is that only one DBMS at a time is supported (by the community edition). Am I missing something?
I simulate the behavior I want by stopping the instance, replacing the contents of the files it uses (in /var/lib/neo4j
) and restarting (I run on a CentOS 7 platform).
It would be nice if there was a more graceful way to accomplish this.
05-08-2020 04:56 PM
In 4.0.x community edition, per dbms, you will only have access to the neo4j db, and the system db (which is reserved for admin/security and not available to be used as a general db).
If you're running Neo4j 3.5.x or below, you can use change the neo4j.conf config property dbms.active_database to change which database the dbms will use, this may be easier for you than replacing file contents.
It will still require a shutdown before you change the config property though.
05-05-2020 08:04 AM
This seems like a great situation to use docker, but I only spin up one container at a time. https://neo4j.com/developer/docker-run-neo4j/
All the sessions of the conference are now available online