24

I'm using Debian 9.9 and the version of Neo4j is 4.0. I'm having problems creating a new database using the neo4j browser. The instruction I followed is this.

I have tried the following Cypher command:

create database myNewDatabase

However, an error pops up like this:

Neo.ClientError.Statement.NotSystemDatabaseError
Unsupported administration command: create database myNewDatabase

Please let me know what the error message means and how I can solve it. Thx in advance:-)

user12949097
  • 423
  • 1
  • 4
  • 10
  • The snapshot doesn't show correctly. The error message is this:Unsupported administration command: create database myNewDatabase – user12949097 Feb 27 '20 at 09:26
  • 1
    I don't get why this error message is not explained in the docs. It just appears on the community sites of neo4j a few times. – BairDev Oct 29 '20 at 13:26
  • 1
    The community/enterprise difference is mentioned explicitly here: https://community.neo4j.com/t/embedded-neo4j-graph-for-existing-database-in-java/14970/2 – BairDev Oct 29 '20 at 13:28

3 Answers3

38

In v. 4 (release Feb. 2020) of the professional version of Neo4j, it's easy to create new databases. Documentation

In the community edition, it takes a hack:

1. Edit the file  NEO4J_HOME\conf\neo4j.conf

2. Un-comment the line:  dbms.default_database=neo4j

3. Change the neo4j  to whatever database name you want for a new database.  Note: names must have between 3 and 63 characters.   For example:   dbms.default_database=mydatabase

4. Save the file

5. (If applicable) Kill the database server, and close the browser window with the Neo4j UI

6. Start the neo4j server, and open a new browser window, pointed as usual to http://localhost:7474/

7. Both the old (default) database, "neo4j" and the one you just created will show up.  However, attempting to switch between them causes an error.   If a switch is desired, repeat the above steps starting from (3)

Note: the above steps will create a folder named mydatabase (or whatever name you used), in NEO4J_HOME\data\databases , and it will populate its contents.

I personally think that switching between databases is such a BASIC operation that Neo4j ought to make it easily accessible in the Community edition!

7

I think I've got the answer to my question. It turns out that my license (the community edition) is not supported for working with multiple databases. An alternative could be this.

user12949097
  • 423
  • 1
  • 4
  • 10
  • 2
    FYI, I found that in Neo4j 4.0, dbms.active_database has been removed from neo4j.conf. That means the alternative is no longer working. – user12949097 Feb 27 '20 at 19:20
  • 2
    I just noticed the same while installing neo4j; in your conf file uncomment and change the default database name parameter to whatever name you want and this adds a new database – JuanCarlosV Feb 28 '20 at 00:27
0

maybe we can create multiple neo4j instance like http://localhost:7474/neo4j1 andhttp://localhost:7475/neo4j2 and so on

and then we install a nginx for flow forwarding and proivide a server like http://localhost:7470