Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
978 views
in Technique[技术] by (71.8m points)

mqtt - Read .db file in Mosquitto

I'm using Mosquitto Project (http://mosquitto.org), this is my mosquitto.conf

persistence_file mosquitto.db

persistence_location C:/var/lib/mosquitto/

After running, I have got mosquitto.db, but I can't open it. I'm trying open with Microsoft Excel, sqlitebrowser_200_b1_win but it's not working. Please help me. Thanks in advance

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I just answered this same question on the mosquitto answers tracker:

https://answers.launchpad.net/mosquitto/+question/217523

The mosquitto.db file holds internal persistence information on client subscriptions and retained messages. It isn't intended for use outside of mosquitto. There is no guarantee that it is up to date information.

Having said that, if you are interested in looking at the file then the source file to look at is src/persist.c. There is also a program to print the file contents in a more readable manner - you should compile src/db_dump/db_dump.c.

mosquitto.db is an internal file and has nothing to do with sql.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...