Reputation: 1811
After I created a neo4j docker container and imported data using admin-import the database is not found.
@neo4j> :use dgraph
Unable to get a routing table for database 'dgraph' because this database does not exist
1) run the docker container
docker run \
--name=neo4j \
--publish=7474:7474 --publish=7687:7687 \
--volume=[...]/neo4j/data:/data \
--volume=[...]/neo4j/import:/var/lib/neo4j/import \
--env=NEO4J_AUTH=none \
neo4j
2) open bash in container
docker exec -it neo4j bash
3) create new database folder in data/databases
mkdir data/databases/dgraph
3) run admin-import
docker exec -it neo4j bash
>> cd import
>> neo4j-admin import \
--database=dgraph \
[...]
Import succesfull message and data/databases/dgraph contains database files (like data/databases/neo4j)
3) chown all files to neo4j user
chown -R neo4j:neo4j data
But still: I can't use the newly created database :( Surely I'm missing something but I cant figure out what.
Any help is much appreciated
Upvotes: 2
Views: 1085
Reputation: 1811
It turned out that the standard database in neo4j.conf needs to be set to the name of the new created database. After that I restarted the container and it worked :)
Upvotes: 2