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)

相关推荐
喜欢打篮球的普通人3 天前
MLIR快速入门
neo4j·mlir
ELI_He9993 天前
Neo4j 安装 APOC
neo4j
綮地3 天前
Neo4j 基本处理
neo4j
lzp07913 天前
Neo4j图数据库学习(二)——SpringBoot整合Neo4j
数据库·学习·neo4j
爱折腾的小码农3 天前
neo4j数据库桌面管理工具
数据库·neo4j
Wenhao.8 天前
Docker 安装 neo4j
docker·容器·neo4j
RDCJM9 天前
Neo4j图数据库学习(二)——SpringBoot整合Neo4j
数据库·学习·neo4j
机器不学习我也不学习10 天前
TensorFlow环境安装
neo4j
码农老李11 天前
vxWorks7.0 Simpc运行tensorflow lite example
人工智能·tensorflow·neo4j
小鸡吃米…1 个月前
TensorFlow 实现异或(XOR)运算
人工智能·python·tensorflow·neo4j