How to create connection between my Ionic application and a MySql database?

Hello , i want to know how to create a connection between a mysql data base using java or php to my ionic v3 application.

Use the frameworks network calls, e.g. Angular’s HTTP get, and call the api that you wrote on your server to interact with your database.

1 Like

Hello , sorry , i do not understand .
what do you mean about call the api that i wrote on my server?

All i know is that i want to connect the database to the ionic application but i do not know how to use any api and even what are they , :smiley:

You are going to have spend some time learning the,but that is the life of programmer. You can’t talk directly to the database from Ionic. There will need to be some code that your Ionic app will make a call to that in turn will perform the database query and return the result. A common combination will be PHP and MySQL. You will write PHP code that will take in the request, perform the query on the database and then return the result. All of this is on a server and NOT in your Ionic application.

On the Ionic side, Angular’s HTTP module allows you to call that remote PHP code and await the response.

I would suggest finding some courses on this topic.

1 Like

Sir , Thank you , i am searching about doing this using java language not php , is it possible?

do u suggest me any good course ?