Meteor and mysql = offline APP?

I have a mySQL database with all my content (users, recipes, comments and more)

Is it posible to make a Meteor app (Android, IOS and Windows) that works offline with the mySQL as a Database?

(I use Vuejs and Vuetify for my new projects)

You could create an Electron app for Windows. I don’t know if you can make the Electron app also install mySQL though.

You can’t put a mySQL database on your phone though as far as I know. You can use ground:db though.

MySQL is meant to be used as server, where clients connect to ask queries or update data.
If you need an embedded DB, I’d recommend SQLite.

By “offline app” do you mean an app that is offline first, but when an internet connection is established you’ll sync the data back to the meteor server?
If you want to build something that is purely offline, with no sync back, you don’t need meteor at all.

Offline first app:

You’d need to create a sync server (for example, Meteor), where data is stored and synced back to clients.
If you use react-native, you can use react-native-meteor-offline with react-native-meteor. react-native-meteor provides you a way to connect to your Meteor server, sync collections and execute methods. react-native-meteor-offline provides you with a way to cache locally collections’ data, so you can use it while offline.

Please be aware of two things: You don’t have SQL this way (only minimongo), and methods/updates don’t get synced back automagically. You’ll need to have a store of changes to sync back the data.

Another option is to use Cordova with ground:db, as @herteby said. This way you’ll have most of the features of meteor available offline, but at the cost of performance and not having access to the native UI (only HTML/CSS).

Offline only

If you want to target both iOS/android at the same time, react-native might be your best bet. Since it’s offline only, you don’t need Meteor at all. You can use any database available for react-native and use it to store your data, and you’re done.

As for Windows, I’ve never made anything for that platform, so I’m not sure. Most people use Electron, which is like Cordova for the desktop. If you want something more performant (and know C++) you can go with Qt.

I’m making a Recipe app and all the recipes are in a mySQL DB.

  1. People download my app
  2. They have internet and se mayby 20 recipes
  3. They lose there internet and want to se one of the recipes they have been looking at (cached)

How is that possible? and it must work with android,IOS, And Browser (Windows eg.)

Will it work with ?

some people say I can use GrapeQL, is that correct?

The problem is the database is a mySQL and all my new projects use Meteor and MongoDB

You can use MySQL with Meteor with or without GraphQL. There are several npm MySQL packages to choose from (I’ve used a couple myself). It’s really just a case of using Meteor methods and ensuring any passed arguments are validated and sanitised.

Do the MySQL packages work offline so the data people have been looking still work offline like with mongodb?

No - but you could use ground:db to cache MySQL data. When it’s returned from the method it’s just a lump of data (usually an array of rows).

You don’t get an isomorphic API for SQL, if that’s what you mean.

You could probably get it to work with that, although it does require replication enabling on your MySQL database. However, in all honesty, I’d stick with an npm package and forgo reactive data. If you’re offline, you’ll lose that, anyway.

This one?

I was suggesting standard (including official) npm packages. Ones I’ve used: