Coder Social home page Coder Social logo

Comments (5)

JaceHo avatar JaceHo commented on July 26, 2024

@Erylee Ofcourse, replacement should work

from emqx-auth-mysql.

lsxredrain avatar lsxredrain commented on July 26, 2024

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8' at line 8
fix bug as follows:
CREATE TABLE auth_user (
id int(11) NOT NULL AUTO_INCREMENT,
password varchar(128) NOT NULL,
is_superuser tinyint(1) NOT NULL,
username varchar(30) NOT NULL,
PRIMARY KEY (id)
UNIQUE KEY username (username)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8
CREATE TABLE auth_acl (
id int(11) NOT NULL AUTO_INCREMENT,
topic varchar(100) NOT NULL,
username varchar(30) NOT NULL,
rw int(11) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8

from emqx-auth-mysql.

JaceHo avatar JaceHo commented on July 26, 2024

@lsxredrain , ok, updated

from emqx-auth-mysql.

lsxredrain avatar lsxredrain commented on July 26, 2024

[
{emysql, [
{pool, 4},
{host, "localhost"},
{port, 3306},
{username, "root"},
{password, "root"},
{database, "emqtt"},
{encoding, utf8}
]},
{emqttd_plugin_mysql, [
{users_table, auth_user}, %% here "users_table" should modified "to user_table"
{acls_table, auth_acl},
{field_mapper, [
{username, username},
{password, password, pbkdf2},
{user_super, is_super_user},
{acl_username, username},
{acl_rw, rw},
{acl_topic, topic}
]}
]}
].
in emqttd_auth_mysql.erl file ,use “user_tables"
{ok, #state{user_table = proplists:get_value(user_table, Opts, auth_user),
but in emqttd_auth_acl.erl file, use "“users_tables"

user_table = proplists:get_value(users_table, Opts, auth_user),

from emqx-auth-mysql.

JaceHo avatar JaceHo commented on July 26, 2024

@lsxredrain updated

from emqx-auth-mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.