






















1、 找到MQtt 的 /etc/plugins/ 文件夹下的emqx_auth_mnesia.conf 文件

vim打开编辑该文件,根据例子添加账号密码 并保存
添加内容:
auth.user.1.username = admin
auth.user.1.password = 123456

2、配置禁止匿名登录(安全认证)
找到emqx.conf编辑
## Allow anonymous authentication by default if no auth plugins loaded. ## Notice: Disable the option in production deployment! ## ## Value: true | false allow_anonymous = false ## Allow or deny if no ACL rules matched. ## ## Value: allow | deny acl_nomatch = deny
3、打开EMQX后台, 找到emqx_auth_mnesia插件并启动

4、重启emqx
emqx restart
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。