Error occurs when creating a new database under Neo4j 4.0

Viewed 14686

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:-)

2 Answers

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!

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.

Related