Post the Neo4j version you are using now. Did you upgrade Neo4j version? if so what was your older version and new version? Also, did you seen ant error message in SHOW DATABASES?
Thanks for the response.
I was writing commands in cypher-shell, which requires semicolon at the end.
I am using Enterprise version, which allows multiple databases. It was working before, but stopped working now.
I tried running it in bin/cypher-shell.
I have stopped foo and then started it.
There is no problem in my environment.
My environment is Neo4j 4.1.3 Enterprise, MacOS 10.15.7
I haven't changed anything in conf.
neo4j@neo4j> call dbms.components();
+-------------------------------------------+
| name | versions | edition |
+-------------------------------------------+
| "Neo4j Kernel" | ["4.1.3"] | "enterprise" |
+-------------------------------------------+
1 row available after 27 ms, consumed after another 2 ms
neo4j@neo4j> show databases;
+------------------------------------------------------------------------------------------------+
| name | address | role | requestedStatus | currentStatus | error | default |
+------------------------------------------------------------------------------------------------+
| "foo" | "localhost:7687" | "standalone" | "online" | "online" | "" | FALSE |
| "neo4j" | "localhost:7687" | "standalone" | "online" | "online" | "" | TRUE |
| "system" | "localhost:7687" | "standalone" | "online" | "online" | "" | FALSE |
+------------------------------------------------------------------------------------------------+
3 rows available after 243 ms, consumed after another 23 ms
neo4j@neo4j> :USE foo;
neo4j@foo> SHOW DATABASE foo;
+---------------------------------------------------------------------------------------------+
| name | address | role | requestedStatus | currentStatus | error | default |
+---------------------------------------------------------------------------------------------+
| "foo" | "localhost:7687" | "standalone" | "online" | "online" | "" | FALSE |
+---------------------------------------------------------------------------------------------+
1 row available after 96 ms, consumed after another 6 ms
neo4j@foo> STOP DATABASE foo;
0 rows available after 397 ms, consumed after another 0 ms
neo4j@foo> SHOW DATABASE foo;
Database 'foo' is unavailable.
neo4j@foo> :USE SYSTEM
neo4j@system> SHOW DATABASE foo;
+---------------------------------------------------------------------------------------------+
| name | address | role | requestedStatus | currentStatus | error | default |
+---------------------------------------------------------------------------------------------+
| "foo" | "localhost:7687" | "standalone" | "offline" | "offline" | "" | FALSE |
+---------------------------------------------------------------------------------------------+
1 row available after 5 ms, consumed after another 2 ms
neo4j@system> START DATABASE foo;
0 rows available after 99 ms, consumed after another 0 ms
neo4j@system> SHOW DATABASE foo;
+---------------------------------------------------------------------------------------------+
| name | address | role | requestedStatus | currentStatus | error | default |
+---------------------------------------------------------------------------------------------+
| "foo" | "localhost:7687" | "standalone" | "online" | "online" | "" | FALSE |
+---------------------------------------------------------------------------------------------+
1 row available after 14 ms, consumed after another 2 ms
I have finally managed to solve the issue. It was because of file permission of a file /var/lib/neo4j/data/transactions/foo/neostore.transaction.db.26 . May be somehow the user neo4j lost access to this file. I looked into the debug log file, /var/log/neo4j/debug.log and found exception message java.nio.file.AccessDeniedException: /var/lib/neo4j/data/transactions/foo/neostore.transaction.db.26 then I changed the file permission for neo4j user using command: