React Native Local Database Sync with Mysql - mysql

Is possible to Offline sqlLite saved data send or sync with live MySQL database in server side ?

I found my own solution to this scenario.
I try to build up React Native mobile app working with Laravel backend(PHP) and my app working online and offline both. So my mobile app using Realm (of MongoDB) to app db and MySQL in severe side (Laravel). I create the flag field in both dbs to know that row is sync or not and i develop the function to check that flag field and sync to both db and update flag field as my wish. You can try this with SQLite or any other mobile db.
Realm:https://docs.mongodb.com/realm/

The most easy way to do so is to use WatermelonDB.
See: https://github.com/Nozbe/WatermelonDB
It provides a syncing option from which you can automatically sync your database with the backend. It uses SQlite on it back. For synchronisation see:
https://nozbe.github.io/WatermelonDB/Advanced/Sync.html

Related

How to synchronize IndexedDB with MySQL uploading a specific table?

I am developping a offline web app with NodeJS. I managed to store the data I wanted to a IndexedDB database with Service Workers. But I can't synchronize them with my MySQL remote server. I was wondering what was the most feasible solution ?
I tried implement this solution of a tutorial in my app but without success. This is the link of the tutorial:https://codeforgeek.com/sync-app-mysql-indexeddb/

How to access server MySQL database from iOS app

I'm trying to write an iOS app using Xcode.
A simple login prompting username and password.
I have no idea how to open a database connection to validate the username and password.
The database I use is mysql.
I tried using this link http://macbug.org/macosxsample/mysql#.Ur8AYBbtGPF
but I get an error when I tried to add libmysqlclient.a to the frameworks and library.
If your database is on a server somewhere, then you would generally not have your iOS app interact directly with the database server, but rather you would write a web service that the app would interact with (via NSURLConnection, NSURLSession or something like AFNetworking), and the web service would interact with the MySQL database.
In terms of how to write a web service, often, when people are writing their first web service, they'll use some simple technology like PHP. Do you know what options you have on your server? If PHP is an option, then you can check out Ray Wenderlich's How to Write a Simple PHP/MySQL Web Service. Then check out How to Write an iOS App that Uses a Web Service.
You should use SQLite instead of MySQL for iOS application. You are referring MacOSX application tutorial. try this http://www.raywenderlich.com/913/sqlite-tutorial-for-ios-making-our-app

distribute AIR application attached with MYSql database

How can i distibute an AIR application attached with MySQL database. I actually want, that the user should not be bothered with setting up the database ( the way it needs to be done, when installing a web application like wordpress etc, that communicates with database).
Also cannot use JSON or XML, as the data is confidential.
Can sqlite or mongo be a better option ?
Vishwas

How do I allow a user to install MySQL on a user's machine more easily so they can connect to it via a Java application?

Let's say I have written an application in Java that is programmed to use a MySQL database. The user of the Java application needs to have MySQL on their machine in order for the application to work.
What can I do to make sure that the user has the correct version of MySQL on their machine and if they don't then install it so they can properly run the Java application?
Note: I had sent some links to setup Java and MySQL for a business analyst of a program I am working on and he was not able to decipher the madness that is installing MySQL. He is not computer technical and wouldn't even know what to enter into the forms of the MySQL installation. What could I do to ease this task for the end user?
Update: Unfortunately, for security reasons that are a requirement for this project we have to use MySQL and not SQLite or Derby. Unless there is a way to make sure that no one deletes the SQLite database file or switches it out for another one. We need to guarantee data integrity and I find that using MySQL gives me the best chance at doing that.
What is the target platform?
Assuming something UNIXish, you can either:
1) Include a shell script to download, install, and setup mysql. Complicated, but not impossible.
2) Use an embedded Derby database. On my current project, we have a version where the user can just "download and go." That version uses an embedded Derby database that writes to a file, similar to hsqldb or sqlite3. Any of those are fine options.
The easiest thing for the user is to embed the database in the Java application. No setup required. There's MySQL OEM (not free), so you might consider switching to SQLite instead, which is the de facto standard embedded database. (See this question for more on that.)

load the mysql driver in android emulator

how to load the mysql server in android emulator
i.e
Class.forName("com.mysql.jdbc.Driver")
i got the exception java.land.ClassNotFoundException in com.mysql.jdbc.Drive
please reply me.
This assumes MySQL is publicly available from internet, but it is never good idea .
Setup public WebService and connect to it from mobile application.
You won't be able to run MySQL server on an Android device.
What you're doing, however, is trying to load the MySQL client library. That isn't included as part of Android so you cannot load it. You'd need to include the relevant JARs in your project, if you really do want to connect to a remote MySQL database from an Android app.
If you do want to store and access data on your Android device, the awesome SQLite database is included by default, including all the APIs you need to create, upgrade and otherwise interact with SQLite databases.
When I did this I created PHP files for the database operations. I sent data in XML and received data in XML all using PHP scripts. I found this to be the easiest way for me...but you need to know PHP of course.