EMQX配置用户名和密码开启emqx_auth_mnesia认证方式连接

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

 

posted on 2024-01-23 15:58  uestc2007  阅读(774)  评论(0编辑  收藏  举报

导航