之前用老的版本4.4.x创建库时,用的密码都是123456
用python连接neo4j的配置参数如下
driver = GraphDatabase.driver("neo4j://localhost:7687",
auth=("neo4j", "123456"))
升级到5.4.0后,系统要求密码至少是八位,于是我设置成了12345678。其间忽视了密码升级问题,用老的配置参数会报以下错误:
{code: Neo.ClientError.Security.Unauthorized} {message: The client is unauthorized due to authentication failure.}
解决方法很简单,在python代码中讲auth配置中的密码改成新库设置的八位密码即可:
driver = GraphDatabase.driver("neo4j://localhost:7687",
auth=("neo4j", "12345678"))