Mysql Node


Store data from mqtt to store in database.

graph LR; A[mqtt in] --> B[function]; A --> E[debug]; B --> C[(mysql)]; C --> D[debug];

function node configuration


msg.topic = 
`INSERT INTO Book (name) VALUES ('${msg.payload}')`
return msg;
    

mysql node configuration


Host: 127.0.0.1
Port: 3306
User: root
Password: ...
Database: demo
Charset: UTF8
    

You can check the followings,


mysql -u root -p
show databases;
use demo;
show tables;
select * from Book;
    

References