I've recently finished working on my first JavaFX app. It connects with a MySQL database that is set up on a local server. Before using the application I need to start the servers running using Xampp. Now I want to finally pack my app into an .exe file and use it. I'm a complete newbie when it comes to the servers and databases. My question is - what do I do to make my app connect with the database itself once the user opens it? Do I need to switch from a local host server to a remote server that will not require starting it each time?
My JavaFX app connects with MySQL using JDBC.
private static String url = "jdbc:mysql://localhost:3306/Finance?useSSL=false&serverTimezone=UTC";
private static String login = "root";
private static String password = "";
public static Connection getConnection() throws SQLException {
Connection connection = DriverManager.getConnection(url, login, password);
return connection;
}