emqx_auth_mysql 模块无法启动

emqx_auth_mysql 模块无法启动,emqx_auth_mysql.conf 已经配置

文档:MySQL 认证 | EMQ Docs

{emqx_auth_mysql,{bad_return,{{emqx_auth_mysql_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,emqx_auth_mysql,{shutdown,{failed_to_start_child,worker_sup,{shutdown,{failed_to_start_child,{worker,1},{{badmatch,{error,econnrefused}},[{mysql_conn,connect_socket,1,[{file,"mysql_conn.erl"},{line,160}]},{mysql_conn,'-connect/1-fun-0-',2,[{file,"mysql_conn.erl"},{line,136}]}]}}}}}}}}},[{emqx_auth_mysql_app,start,2,[{file,"emqx_auth_mysql_app.erl"},{line,38}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,277}]}]}}}}}

你好,可以看到错误原因是 {error, econnrefused},这表示服务端(MySQL)拒绝了连接,检查一下 插件中 MySQL 的配置。