how can I mosquitto + mysql service

Asked by RyujiHoon

my OS is CentOs 6.5 version
mosquitto version 1.4.2
mysql version 5.6.42

I'm beginner in mosquitto user this is very hard

Please help me

Q1. why doesn't create m2.db file ?

my mosquitto.conf

autosave_interval 1800
persistence true
persistence_file m2.db
persistence_location /usr/local/mosquitto/
connection_messages true
log_timestamp true

listener 1883

listener 9001 127.0.0.1
protocol websockets

listener 9002 127.0.0.1
protocol websockets

Q2. how can I use the mysql connection mosquitto

how can I use mysql in the mosquitto...

Question information

Language:
Korean Edit question
Status:
Expired
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Roger Light (roger.light) said :
#1

> Q1. why doesn't create m2.db file ?
...
> persistence_location /usr/local/mosquitto/

I imagine that the user you are running mosquitto as doesn't have permission to write to this directory.

> Q2. how can I use the mysql connection mosquitto
>
> how can I use mysql in the mosquitto...

If you want to use it for authentication, please see e.g. https://github.com/jpmens/mosquitto-auth-plug

If you want to do something else, you'll have to write your own code to do it.

Best of luck!

Revision history for this message
RyujiHoon (qiqb123) said :
#2

I really appreciate to your reply.
 I'm really sorry, but the one thing I will question more..
My current server status

client server client
Web -> mosquitto -> Web
Chat mysql chat
pub/sub pub/sub

in the chat using a web site created
Chat for information were through the linux mosquitto Server
And chat with each other.
The chat mosquitto server that is in a broker
I want to save the send and received information on mysq.

To use this feature, you need to create a low-cost direct source?

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.