http://localhost:7474/browser/ 登陆之后账号密码neo4j / neo4j 不对 页面出现以下:

一步重置密码并连接

  1. 停服务
复制代码

/soft/neo4j-community-2025.09.0/bin/neo4j stop

  1. 设定初始密码 (推荐自定义一个强密码,比如 Neo4!
复制代码

/soft/neo4j-community-2025.09.0/bin/neo4j-admin dbms set-initial-password 'Neo5!'

  • 如果返回 "password already set",继续执行第 3 步"清 auth 文件"。
  1. (仅当上一步报已设置时)清除旧认证文件后再设

仅影响用户认证信息,不影响图数据;适用于开发/测试环境。

复制代码

rm -f /soft/neo4j-community-2025.09.0/data/dbms/auth /soft/neo4j-community-2025.09.0/bin/neo4j-admin dbms set-initial-password 'Neo45!'

  1. 启动服务
复制代码

/soft/neo4j-community-2025.09.0/bin/neo4j start

  1. 浏览器连接
  • 打开:http://192.168.232.129:7474/browser/

  • Connect URL 里填:bolt://192.168.232.129:7687

  • Username:neo4j

  • Password:Neo4j5!(你刚设的)

看到 "Could not reach Neo4j" 时,先在 Windows PowerShell 测下端口通不通:

复制代码

Test-NetConnection 192.168.232.129 -Port 7687

若不通,检查 VM 防火墙:

复制代码

firewall-cmd --permanent --add-port=7687/tcp firewall-cmd --permanent --add-port=7474/tcp firewall-cmd --reload

连接项快速自检

  • neo4j.conf 里应有:

    复制代码

    server.default_listen_address=0.0.0.0 server.http.enabled=true server.http.listen_address=:7474 server.http.advertised_address=192.168.232.129:7474 server.bolt.enabled=true server.bolt.listen_address=:7687 server.bolt.advertised_address=192.168.232.129:7687 dbms.security.auth_enabled=true

  • 端口监听:

    复制代码

    ss -ltnp | grep -E '(:7474|:7687)'

按上面重置后,用 neo4j / 你新设的密码 登录就能进。

如果出现:

root@localhost conf\]# /soft/neo4j-community-2025.09.0/bin/neo4j-admin dbms set-initial-password 'Neo5!' Changed password for user 'neo4j'. IMPORTANT: this change will only take effect if performed before the database is started for the first time. 那条提示其实是 Neo4j 的标准输出: > `Changed password for user 'neo4j'. IMPORTANT: this change will only take effect if performed before the database is started for the first time.` 意思是「如果数据库已经启动过一次,这条命令不会生效」。 现在你可以按这个顺序把密码彻底改好并重新连上: *** ** * ** *** #### 🔧 1. 停 Neo4j ``` ``` `/soft/neo4j-community-2025.09.0/bin/neo4j stop ` #### 🔧 2. 删除旧认证文件 > 这一步会清除旧的 neo4j 账户密码,仅限开发环境用。 ``` ``` `rm -f /soft/neo4j-community-2025.09.0/data/dbms/auth ` #### 🔧 3. 重新设置初始密码 ``` ``` `/soft/neo4j-community-2025.09.0/bin/neo4j-admin dbms set-initial-password 'Neo45!' ` #### 🔧 4. 启动数据库 ``` ``` `/soft/neo4j-community-2025.09.0/bin/neo4j start ` #### 🔧 5. 浏览器连接 在宿主机打开 ``` ``` `http://192.168.232.129:7474/browser/ ` 然后在登录框里填: * **Connect URL** → `bolt://192.168.232.129:7687` * **Username** → `neo4j` * **Password** → `Neo45!` *** ** * ** *** #### ✅ 如果仍连不上 Bolt 1. 确认端口已开放: ``` ``` `ss -ltnp | grep 7687 ` 1. 宿主机测试: ``` ``` `Test-NetConnection 192.168.232.129 -Port 7687 ` 1. VM 内放行防火墙: ``` ``` `firewall-cmd --permanent --add-port=7687/tcp firewall-cmd --permanent --add-port=7474/tcp firewall-cmd --reload` 控制台显示 \[root@localhost conf\]# /soft/neo4j-community-2025.09.0/bin/neo4j stop Neo4j is not running. \[root@localhost conf\]# rm -f /soft/neo4j-community-2025.09.0/data/dbms/auth \[root@localhost conf\]# /soft/neo4j-community-2025.09.0/bin/neo4j-admin dbms set-initial-password 'Neo45!' Changed password for user 'neo4j'. IMPORTANT: this change will only take effect if performed before the database is started for the first time. 很好,认证文件已清空并设置了新初始密码。现在按下面两步完成登录: ### 1) 启动并自检 ``` ``` `/soft/neo4j-community-2025.09.0/bin/neo4j start ss -ltnp | grep -E '(:7474|:7687)' # 应看到 7474/7687 在 LISTEN tail -n 50 /soft/neo4j-community-2025.09.0/logs/neo4j.log ` ### 2) 通过 Browser 连接 在宿主机浏览器打开: ``` ``` `http://192.168.232.129:7474/browser/ ` 在连接框里: * **Connect URL** :`bolt://192.168.232.129:7687`(不要用 neo4j://) * **Username** :`neo4j` * **Password** :`Neo4j5!`(你刚设置的) > 若提示 "Could not reach Neo4j",在宿主机跑: > > * `Test-NetConnection 192.168.232.129 -Port 7687`(Windows) > > 在虚机上放行端口(如开启了 firewalld): > > ``` > > ``` > > `firewall-cmd --permanent --add-port=7474/tcp firewall-cmd --permanent --add-port=7687/tcp firewall-cmd --reload` ![](https://i-blog.csdnimg.cn/direct/52ef01add3184f7b8c8a56aa1745e531.png)

相关推荐
小鸡吃米…6 天前
TensorFlow 实现异或(XOR)运算
人工智能·python·tensorflow·neo4j
坐吃山猪6 天前
Neo4j04_数据库事务
数据库·oracle·neo4j
小鸡吃米…6 天前
TensorFlow 实现梯度下降优化
人工智能·python·tensorflow·neo4j
KG_LLM图谱增强大模型6 天前
图谱驱动大模型智能体普惠时代:Neo4j Aura Agent正式全面上线
neo4j
坐吃山猪6 天前
Docker06-Neo4j启动
neo4j
小鸡吃米…8 天前
TensorFlow 分布式计算
neo4j
小鸡吃米…8 天前
TensorFlow 模型导出
python·tensorflow·neo4j
麦麦大数据12 天前
M003_中药可视化系统开发实践:知识图谱与AI智能问答的完美结合
人工智能·flask·llm·vue3·知识图谱·neo4j·ner
014-code14 天前
Spring Boot 集成 Neo4j 图数据库实战教程
java·数据库·neo4j
小鸡吃米…16 天前
TensorFlow——TFLearn 及其安装
python·tensorflow·neo4j