Ionic 4, mySQL and Node.js


I am using mySQL for my database (remote server). I am trying to make restful api using Node.js (still new). I am able to retrieve the data value from mySQL on my console terminal. However, I need to display the data value on my ionic application. Are there any tutorials or reference for me. Thank you.



Thanks for the reference. I saw this before but i don’t know how to convert mongoDB to mySQL. Sorry for my lack of knowledge.


There are multiple tutorials on how to connect ionic to a MySQL DB.
Since MySQL is not running directly on the phone, you link your app via a PHP API or NodeJs API linked to a databse.
The workflow would simply be:

  1. Prepare your data and or then make http call to Nodejs or PHP API via GET,POST,PUT,DELETE
  2. Depending on the call you made you’ll get feedback based on your API design.
  3. Process the feedback and probably display it on your app.
  4. Repeat other different calls may be based on need.

Here is a tutorial by Josh Morony showcasing how to consume a MySQL DB via Ionic App.

=> NodeJs MySQL API

The API endpoints in the codementor tutorial would be what you make calls to in your ionic app if you were using NodeJs instead of a PHP API.

=> NodeJS MySQL Tutes