4 Replies Latest reply on Sep 8, 2008 8:15 PM by mjr81

    SQLite to MySQL synchronization?

    mark416 Level 1

      I have a local SQLite db and a online MYSQL.

      How to synchronize them?

      Thank you for your help

        • 1. Re: SQLite to MySQL synchronization?
          what is the point?

          because you could just send a query to both and thats it

          you could be more specific please?
          • 2. Re: SQLite to MySQL synchronization?
            mark416 Level 1
            The application works offline in most time. I need make a backup online

            May I do this with dot net?


            • 3. Re: SQLite to MySQL synchronization?
              Dr. Fred Mbogo Level 1
              Perhaps the simplest would be to keep a local log file of successful SQL queries. Then when you reconnect, you "replay" the log to the remote DB. This works only insofar as you restrict yourself to the common subset of SQL that both databases speak. SQLite is missing a lot of things compared to MySQL.

              There are lots of ways to get that query log up to the server. I'd probably POST it to a web service running on the same machine as the MySQL server. Because you're uploading raw SQL, you need to be careful to protect this input path into your application so it's only used for appropriate things.

              Another option you may have overlooked is using SQLite on the server side as well. MySQL is great and all, but if you're not using its advanced features and you're not running it on a separate machine from the clients, it doesn't really give you anything over SQLite.
              • 4. Re: SQLite to MySQL synchronization?
                If it were me, I'd simply turn the entire sqlite into one great big JSON post to a server side script that puts it all into the DB. Just make sure the server is set to accept POSTs greater than your total expected DB size.