question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How save name MQTT topic to mysql

See original GitHub issue

Hello all! I want save body MQTT topic to mysql.

How to implement this in mqttwarn.ini ?

My mqttwarn.ini:

[defaults]
hostname  = 'localhost'
port      = 1883

; name the service providers you will be using.
launch	 = mysql


[config:mysql]
host  =  'mysql.******.myjino.ru'
port  =  3306
user  =  '046626376_mqtt'
pass  =  '123456'
dbname  =  '9*******_mqtt'
targets = {
          # tablename  #fallbackcolumn ('NOP' to disable)
 'm2'   : [ 'namess',   'full'            ]
  }
  
[#]
targets = mysql:m2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
jpmenscommented, Sep 17, 2018

The Z is bothering it:

mysql> insert into dt values ("2018-09-17T19:10:24Z");
ERROR 1292 (22007): Incorrect datetime value: '2018-09-17T19:10:24Z' for column 'dt' at row 1
mysql> insert into dt values ("2018-09-17T19:10:24");
Query OK, 1 row affected (0.00 sec)

mysql> select * from dt;
+---------------------+
| dt                  |
+---------------------+
| 2018-09-17 19:10:24 |
+---------------------+
1 row in set (0.01 sec)

mysql>
1reaction
jpmenscommented, Sep 17, 2018

Dangerous territory though if we have to start mucking about with timezones. That is one thing we won’t do. Zulu (UTC) or bust.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to save MQTT messages to MySQL database - Newark
The below command will send topic to the broker and it gets saved in the MySQL database. client.publish('raspberry/topic', payload=i, qos=0, retain=False).
Read more >
Learn, How to save MQTT messages into a MySQL Database
Blog post : http://www.raviyp.com/embedded/233-learn-how-to- save - mqtt -messages-into-a- mysql -databaseThis video explains how we can save MQTT ...
Read more >
Store Messages From Mosquitto MQTT Broker Into SQL ...
1. Processor: Dual Core 1.0GHz Memory: 512MB DDR3 RAM Storage: Up to 2x 10TBUSB: 2x USB3.0 Network: 1x Gb port OS: DiskStation Manager (DSM6.1) 2. Upon sucessful...
Read more >
Store MQTT Data From Sensors Into MySQL Database
This article will explain how e-con's eSOMiMX6 can be used to store MQTT data from sensors into MySQL database using Qt.
Read more >
How to save data from MQTT subscribing to all topics
messageArrived has two parameters one is topic and other is message. – achuth. Feb 28, 2017 at 6:55. Add a comment ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found