Problem Description:
Python runs neo4j and reports an error:
py2neo.database.work.ClientError: [Security.Unauthorized] The client is unauthorized due to authentication failure.
Solution:
1. Adjust the relevant configuration of the neo4j installation directory/conf/neo4j.conf file as shown in the figure below:
#*****************************************************************
# Network connector configuration
#*****************************************************************
# With default configuration Neo4j only accepts local connections.
# To accept non-local connections, uncomment this line:
dbms.connectors.default_listen_address=0.0.0.0
# You can also choose a specific network interface, and configure a non-default
# port for each connector, by setting their individual listen_address.
# The address at which this server can be reached by its clients. This may be the server's IP address or DNS name, or
# it may be the address of a reverse proxy which sits in front of the server. This setting may be overridden for
# individual connectors below.
dbms.connectors.default_advertised_address=localhost
# You can also choose a specific advertised hostname or IP address, and
# configure an advertised port for each connector, by setting their
# individual advertised_address.
# Bolt connector
dbms.connector.bolt.enabled=true
dbms.connector.bolt.tls_level=OPTIONAL
dbms.connector.bolt.listen_address=:7687
# HTTP Connector. There can be zero or one HTTP connectors.
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=:7474
# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=true
dbms.connector.https.listen_address=:7473
2. ctrl+C, close the neo4j database
3. Other processes:
1. Start the Neo4j program through the console
Click the key combination: Windows+R, enter cmd, start the DOS command line window, switch to the home directory, and run the command as an administrator:
neo4j.bat console
2, install Neo4j as a service (Windows Services)
Installation and uninstallation services:
bin\neo4j install-service
bin\neo4j uninstall-service
Start the service, stop the service, restart the service and query the status of the service:
bin\neo4j start
bin\neo4j stop
bin\neo4j restart
bin\neo4j status
3, open neo4j in the browser:
The Neo4j server has an integrated browser. Visit "http://localhost:7474/" on a running server instance, open the browser, and display the startup page