cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Creating new database programmatically when running Docker container

bpruitt
Node Link

I have the community container up and running. I cannot figure out how to programmatically create a new database. Looking at the Driver class I see nothing about creating a new database.

I found examples for embedded database, but a pathname for the new database. Do I go this route and simply use same store dir as the neo4j home data env location?

Or, is Cypher the best approach?

2 REPLIES 2

Community can only have the default database (neo4j) and system. You can't create another database.
Assuming java....
The driver docs tell you how to connect to the database.
You also want to look here The Neo4j Java Developer Reference v4.2 - Neo4j Java Reference
and..
The docs here can show you how to do create/drop, etc. ClusterDatabaseManagementService (Neo4j 4.2.6 API)

bpruitt
Node Link

Thanks. I will proceed accordingly.