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:-)
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
I cannot get APOC to work on neo4j.
Documentation is good ... when present!
I installed the apoc library via Neo4j Desktop:
Launch Neo4j Desktop
Locate DBMS
Select Plugins tab on right
installed the plugin
Then I open a project.
I try:
CALL apoc.load.json("file:///person.json")
YIELD value
RETURN value;
but
There is no procedure with the name `apoc.load.json` registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.
Indeed The available procedures does not display apoc, in spite it is installed.
Then, after I cleared out that Neo4j Desktop is not using the installed community edition I had, and found that i can find the installed versions under the "more" options > Terminal:
I checked that my neoj4.conf file have these lines:
# Leaving this unconfigured will load all procedures found.
#dbms.security.procedures.allowlist=apoc.coll.*,apoc.load.*,gds.*
(commented out, to load everything, so apoc should load...)
I think I have done OK, as here:
APOC installation neo4j desktop
I also tried to delete the project and set it up again:
https://community.neo4j.com/t5/general-discussions/some-apoc-procedures-not-available/m-p/41590
but still not working...
--
How do I get APOC to work ??
Do I have to install it for each project ?
Do I need to configure it for each DB in the project ?
I am using neo4j desktop 1.5.6.
#Edited
today I replicated steps of yesterday, paying attention to the recommendations of #William Lion answer.
At launch of neo4j Desktop, I was prompted an alert that "Local graph password has been changed".
That is strange, because I have not changed it...
It did not accept nor my previous password (the one I use for the server), nor the default 'neo4j', but could pass the alert because I could ignore this change until the next Graph start.
So I ignored it, and was prompted to enter the password to connect with the neo4j server. And this time, apoc were found.
I tried to close the neo4j desktop, quitting from all open projects, and relaunch. This time I was not asked to input the password for the local dbms. So, I assumed the to have restarted the next Graph, following the previous alert, and I was expected to be requested to input the password again.
Maybe the problem was here. So, to avoid future hiccups:
does neo4j reset the password of local dbms itself after a while or after certain conditions ?
after neo4j desktop closes, am I sure all server and open dmbs instances are properly shut down ? What does until the next Graph start actually mean ?
Plugins must be installed for each DBMS instance in Neo4j Desktop (there can be multiple DBMS instances in each project). Also, there can only be one active DBMS in Neo4j Desktop at a given time. Make sure that you have installed the plugin for the DBMS instance that you want to work with AND that DBMS is the one that is currently running. I'm guessing that you successfully installed the plugin for one DBMS, but tried querying with a different active DBMS that did not have the plugin.
I want create new database 'demo' in neo4j, but I see a bug:
I was search but can't find result, can you help me? Thank all!
In the URL you used to install Neo4j, there is a remark about the community version of Neo4j and how it doesn't support multiple databases.
Note: The Community Edition of Neo4j supports running a single
database at a time. Additionally, the Community version does not
include the capability to assign roles and permissions to users so
those steps are not included in this tutorial. For more information
about various features that are supported by the Community Edition of
Neo4j, consult the Neo4j Documentation here.
Go to the neo4j.conf file and uncomment this line
dbms.default_database=neo4j
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
after that add a new database name. then we can maintain new DB but we can't switch to old one, if we need to do that we have to comment above mentioned line again
My Neo4j version is community-4.2.4 in the Mac OS.
I used 'bin/neo4j-admin load --from=xxx/g.db.dump --database=xxx.db --force'. And succeed in finding db file in /data/databases as photo showed below.
enter image description here
But the result returned in Browser adding 'show databases' and cannot find the database what I want.
Thanks u guys all for helping me.
OR sending email for communicating more at masichengyo#gamil.com.
So neo4j-admin load and neo4j-admin restore take care of setting up the db in the filesystem. Back in the 3.5.x days this was enough, provided the name of the graph directory matched the name of the active graph configured in the neo4j.conf.
In Neo4j 4.x we support multidatabase, and the system database is where we can do things such as creating new databases, and if you CREATE DATABASE in the system db with the name of the new database, it will use just use the files it finds and create the entry in the system db, allowing you to use it and switch to it in Neo4j.
Since you're on community edition, you won't be able to create a new database, you're restricted to only the neo4j database, so your import would have to force it using neo4j as the db name, and it would overwrite your current neo4j db.
If you need to create multiple databases besides neo4j and system, then you need to be using enterprise edition.
I recently upgraded to Neo4j 4.0.6. (Community Edition)
After upgrading my "old" Neo4j database the browser :sysinfo command (Chrome and Safari) doesn't show any information. It just displays the empty tables for Store Size, id Allocation etc.
All the tables and labels are shown as in Neo4j 3.x but no values are prompted. It doesn't matter if I change the "Use Database" settings (switch to system and back) or if stop and restart the server. No entries for :sysinfo show up.
Any idea how to reactivate the DB :sysinfo in the browser interface again is greatly appreciated.
Krid
I tend to think its an issue with recent versions.
It caused me to believe a multi upgrade store was incorrect.
So I went the long 'dump to cypher and reimport' route.
After node import, sysinfo was working (4.1 CE)
This behaviour appeared when I added relations
CALL db.schema.visualization() is broken too (no graph tab)
What a time loss, I tell you.
Wont count the days
Somewhere I read to reset the indexes, be sure btree was used.
No, it didnt work.
your next move is to file an issue
It seems ppl also have this issue since 3.5 w/ clusters
https://github.com/neo4j/neo4j/issues?q=is%3Aissue+sysinfo
I was just watching the Belgium Beer demo and I would like to replicate the same process to start structr with an existing neo4j graph.
Unfortunately if do the following steps:
Extract the downloaded structr folder.
Create a folder structr/db and copy the content of my graph.db.
Start structr with appropriate version of this command:
java -cp lib/*;structr-ui-1.1-SNAPSHOT-201505231136.f596a.jar org.structr.Server
I get the following error:
SEVERE: Vital service NodeService failed to start: Error starting
org.neo4j.kern el.EmbeddedGraphDatabase,
c:\Users\DataToValue\Documents\structr.\db. Aborting
Any idea how I could start a structr project with an existing graph db?
Not entirely sure what your goal is, but... you cannot simply use a product with an existing database, just because it uses a database brand which matches what you're already using (in this case, Neo4j). Structr (or any product, for that matter), will have its own data schema, its own product-specific metadata, etc. There's really no way to simply swap out a product's database and swap in your own (unless it was essentially a backup/instance from that product's database content).
With upcoming structr 2.1 version it it possible to specify an external/ existing neo4j DB instance as described here: https://stackoverflow.com/a/43583403/1821792