I have a Java web app, which I have developed and deployed locally on my PC. The application uses jsp files, as well as java servlets. The database is created using phpMyAdmin. Now I want to make this app available online so as other people can use it. To do so, I've created an Azure web app and I deployed my JAVA app to it using a war file. the problem is that I can't connect to the database.
My original code connects to my database using the following code:
Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb", "root", "");
The question is if I want to use "MySQL In App" how can I connect my application to it. Also, If I want to use "Azure for MySQL" how can I connect to it? Do I only need to replace the above two lines (change the connection string)?