Offline Sync with MySQL

Hey guys, I have just started working on a project for a client that has a large web app (AngularJs/PHP/MySQL) that wants to create the equivalent mobile and tablet version. Since the application is already built using Angular it was only natural that I suggested ionic.

I have used ionic in a few other projects that were consuming data from a JSON API but for this one the client requested that the application works even if the user is offline and then sync when connection is restored.

I have been researching this topic for hours but I have failed to find a good, robust, way of doing it. Most just recommend CouchDb/PouchDb combination, but in this case switching to a different database is not an option.

Could anyone show me the right methodology of doing this? Any reading material on the topic will be much appreciated as well.

1 Like

Hi there,

You can try to use PouchDb Server with MySQL backend provided by LevelUp.

Take a look at the FAQ: https://pouchdb.com/faq.html#what_can_pouchdb_sync_with
And the level up backend: https://github.com/Level/levelup/wiki/Modules#storage

I didn’t tryed it yet.

Hi,

Did you find the solution? I’m also facing same situation & badly stuck here.
I have created a cordova ionic app. I have MySQL at the web end. I am trying to use PouchDB but I’m not sure how to sync data between PouchDB & MySQL.

If I’ll use sqlite I have to use Android Background Services to sync data between app & server. As I have to create app in iOS & Windows as well & I’m not sure How to proceed.

Unfortunately no, we decided to postpone the project until ionic2 final is released.
Ionic 2 is supposed to support offline sync through webworkers but I don’t know much about them.

Can anyone shed some light to this issue?

Do you have any link about this feature (offline sync through webworkers) ?

So i’m having this same problem. I need offline sync with my app using MySQL.

My remote server uses MySQL and I need to sync offline data from my app to the remote server when it establishes internet connection again.

Hopefully someone can help me out.

Helo renzz have you been able to achieve that? am having the same problem