Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error occurs when creating a new database under Neo4j 4.0

Tags:

neo4j

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

like image 731
user12949097 Avatar asked Feb 27 '20 09:02

user12949097


People also ask

How do I create a database in Neo4j?

Step 1 - Open Neo4j Data Browser. Step 2 - Type the below command at dollar prompt in Data Browser. Step 3 - Click on Execute button and see the success message in the Data Browser. It shows that one label and one node is created in Neo4j Database.

How do I create a database in Neo4j Community Edition?

x, to create a new database without removing your existing one, you can simply edit the neo4j. conf file in your conf directory of your $NEO4J_HOME . Search for dbms. active_database= , which should have the default value of graph.

Is Neo4j enterprise free?

That said, Neo4j Enterprise Edition is also available for free for a number of uses: Startups with <=50 employees can contact us to receive a free Startup License for Neo4j Enterprise, and anybody & everybody can get a free-for-development use (single-user, local desktop/ single machine) license via Neo4j Desktop.


1 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!

like image 196
Julian - BrainAnnex.org Avatar answered Oct 16 '22 14:10

Julian - BrainAnnex.org