mysql plugin
This commit is contained in:
parent
11c4d24aff
commit
bbd99ed8c1
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
Authentication with user table of MySQL database.
|
Authentication with user table of MySQL database.
|
||||||
|
|
||||||
## Demo User Table
|
## User Table
|
||||||
|
|
||||||
|
Notice: This is a demo table. You could authenticate with any user tables.
|
||||||
|
|
||||||
```
|
```
|
||||||
CREATE TABLE `mqtt_users` (
|
CREATE TABLE `mqtt_users` (
|
||||||
|
@ -16,6 +18,8 @@ CREATE TABLE `mqtt_users` (
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Plugin config
|
## Plugins config
|
||||||
|
|
||||||
|
Please configure 'etc/plugins.config' to loade emysql and emqttd_auth_mysql plugins.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
{pool_size, 4},
|
{pool_size, 4},
|
||||||
{host, "localhost"},
|
{host, "localhost"},
|
||||||
{port, 3306},
|
{port, 3306},
|
||||||
{username, "root"},
|
{username, ""},
|
||||||
{password, "public"},
|
{password, ""},
|
||||||
{database, "mqtt"},
|
{database, "mqtt"},
|
||||||
{encoding, utf8}
|
{encoding, utf8}
|
||||||
]},
|
]},
|
||||||
|
|
Loading…
Reference in New Issue