Mirroring mysql
I have one poject where raspberry pi most of time must work offline and collect data in local mysql database. But when it get online in internet it must syncronice local database with outside server mysql. Who knows how get this. Simple Mysql replications is not suitable in this case.
Re: Mirroring mysql
mysqldump might be what you are looking for:
https://mariadb.com/kb/en/library/mysqldump/
You will have to arrange some means to copy the dump file from your Pi to you other server.
I presume when you say "synchronize" you mean one way not both ways.
https://mariadb.com/kb/en/library/mysqldump/
You will have to arrange some means to copy the dump file from your Pi to you other server.
I presume when you say "synchronize" you mean one way not both ways.
Slava Ukrayini.
Re: Mirroring mysql
Is there a reason that simple replication can't work? For example, the same table in both databases gets updated independently and the changes need to be merged rather than just replicated from one system to the other. MariaDB (replaced MySQL a while back) can just about handle that. I had, until recently, been doing that for the last two and a half years with four servers being updated and replicating the updates to each other.
Re: Mirroring mysql
In this case I need raspberry pi a master and server as slave. In replication case slave connect to master. But I need that raspberry pi when go online connect to server and update database with new records. And as I know replication without internet connections got errors...rpdom wrote: ↑Mon Jan 21, 2019 12:49 pmIs there a reason that simple replication can't work? For example, the same table in both databases gets updated independently and the changes need to be merged rather than just replicated from one system to the other. MariaDB (replaced MySQL a while back) can just about handle that. I had, until recently, been doing that for the last two and a half years with four servers being updated and replicating the updates to each other.
Re: Mirroring mysql
Ok. So if I understand write both (server and raspberry PI) must get real IP addresses. But how I can use replication if Raspberry Pi don't have real IP address? Real IP address is only on server... Raspberry pi will be connetted to internet via GSM board...