今天爱分享给大家带来Elasticsearch 设置账号密码教程【图文详解】,希望能够帮助到大家。
一、摘要
就拿Elasticsearch 6.8.0为例、利用xpack插件进行管理账号密码,6.3版本及之后:已经集成在一起发布,无需额外安装,基础安全属于付费黄金版内容。 7 .1版本:基础安全免费。
二、安装es服务,打开cmd命令窗口,切换到es目录下的bin目录:

三、启动服务+设置服务自动启动


四、启动设置账户密码
报错:
Connection failure to: http://127.0.0.1:9200/_xpack/security/_authenticate?pretty failed: Connection refused: connect ERROR: Failed to connect to elasticsearch at http://127.0.0.1:9200/_xpack/security/_authenticate?pretty. Is the URL correct and elasticsearch running?
解决:


五、重新启动服务,重新再进入cmd窗口

六、完成

默认用户账号:elastic 密码是自己设置的。
原文链接:https://blog.itblood.com/902.html,转载请注明出处。

![困难时期v0.65.1 AI版[PC+安卓/6.96G/更新]Straitened Times [v0.65.1] [欧美SLG/汉化/沙盒]](/wp-content/uploads/replace/2025/10/03/d4b8cdec2bbea529cf8d7eb4760239e4.webp)