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)

相关推荐
郭庆汝13 小时前
Neo4j数据库中批量插入数据(数据在.csv文件中)
数据库·neo4j
serve the people13 小时前
tensorflow 零基础吃透:TensorFlow 稀疏张量(SparseTensor)的核心操作
人工智能·tensorflow·neo4j
serve the people2 天前
tensorflow 零基础吃透:TensorFlow 稀疏张量(SparseTensor)的核心用法
人工智能·tensorflow·neo4j
serve the people2 天前
tensorflow 零基础吃透:RaggedTensor 的不规则形状与广播机制
人工智能·tensorflow·neo4j
serve the people2 天前
tensorflow 零基础吃透:RaggedTensor 的底层编码原理
人工智能·tensorflow·neo4j
MasonYyp3 天前
简单使用FalkorDB和Neo4j图数据库
数据库·neo4j
黑客思维者4 天前
XGW-9000系列高端新能源电站边缘网关技术可行性分析报告V2
neo4j
serve the people4 天前
tensorflow 零基础吃透:RaggedTensor 的索引与切片(规则 + 示例 + 限制)
人工智能·tensorflow·neo4j
serve the people4 天前
tensorflow 零基础吃透:RaggedTensor 与其他张量类型的转换
人工智能·tensorflow·neo4j
serve the people4 天前
tensorflow 零基础吃透:tf.function 与 RaggedTensor 的结合使用
人工智能·tensorflow·neo4j