1

I use neo4j on ubuntu. I want to have two graph db, for regular use and tests. I read article about how switching between two graph db.

I do steps base on article:

cp /etc/neo4j/neo4j.conf /etc/neo4j/neo4j_test/neo4j.conf
# change dbms.active_database=graph.db to # change dbms.active_database=graph_test.db
sudo vim /etc/neo4j/neo4j_test/neo4j.conf
export NEO4J_CONF="/etc/neo4j/neo4j_test"
sudo systemctl restart neo4j

But when I check logs:

sudo journalctl -f -u neo4j

Config is default conf and didn't changed:

Sep 17 11:18:33 pc2 neo4j[32657]:   config:       /etc/neo4j

What is my fault? and is another way to switch between 2 graph db?

mastisa
  • 1,875
  • 3
  • 21
  • 39
  • I have a similar problem running Neo4j on Docker and changing the size of the cache. Currently I have to pass in the options on the command line. When I tried to update the cache using the configuration file, it had no effect. – Guy Coder Sep 17 '18 at 10:12
  • In my case changing configuration file has effect but changing configuration environment variable has no effect. on restart neo4j use default configuration file path. – mastisa Sep 17 '18 at 10:27
  • you have installed Neo4j with a package, so perhap the `init` script override the variables ... Your solution should work with the `bin/neo4j` script – logisima Sep 18 '18 at 08:38

1 Answers1

0

I think you could not save it properly using vim. neo4j.conf is a read-only file. So you can use this command to save read-only file :w !sudo tee %

You can see this question also:E212: Can't open file for writing

  • I know that and if you check my question I tried to open it with sudo. so your answer is not about my question :) – mastisa Mar 01 '20 at 18:00