From aaf5c6b19474c7cbbc6dc337d45319a8036fdf0c Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Tue, 12 May 2015 22:41:16 +0800 Subject: [PATCH] fix plugin config --- plugins/emqttd_auth_mysql/README.md | 7 ++--- plugins/emqttd_auth_mysql/etc/plugin.config | 34 ++++++++++----------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/plugins/emqttd_auth_mysql/README.md b/plugins/emqttd_auth_mysql/README.md index 481a8f3e7..02db17e10 100644 --- a/plugins/emqttd_auth_mysql/README.md +++ b/plugins/emqttd_auth_mysql/README.md @@ -1,11 +1,11 @@ -## Overview + +## Overview Authentication with user table of MySQL database. ## etc/plugin.config -```erlang -[ +``` {emysql, [ {pool, 4}, {host, "localhost"}, @@ -24,7 +24,6 @@ Authentication with user table of MySQL database. {password, password} ]} ]} -]. ``` ## Users Table(Demo) diff --git a/plugins/emqttd_auth_mysql/etc/plugin.config b/plugins/emqttd_auth_mysql/etc/plugin.config index bb9a5817e..a5ef4bc41 100644 --- a/plugins/emqttd_auth_mysql/etc/plugin.config +++ b/plugins/emqttd_auth_mysql/etc/plugin.config @@ -1,18 +1,16 @@ -[ - {emysql, [ - {pool, 4}, - {host, "localhost"}, - {port, 3306}, - {username, "root"}, - {password, "public"}, - {database, "mqtt"}, - {encoding, utf8} - ]}, - {emqttd_auth_mysql, [ - {users_table, mqtt_users}, - {field_mapper, [ - {username, username}, - {password, password, plain} - ]} - ]} -]. +{emysql, [ + {pool, 4}, + {host, "localhost"}, + {port, 3306}, + {username, "root"}, + {password, "public"}, + {database, "mqtt"}, + {encoding, utf8} +]}, +{emqttd_auth_mysql, [ + {users_table, mqtt_users}, + {field_mapper, [ + {username, username}, + {password, password, plain} + ]} +]}