If you hope your customers will run your Java program on their computers and connect it to their MySQL servers, you must put your database connection string into a Java properties file. You have no choice about this. You must allow your customers to set their own connection string values.
Connection strings are used to make new JDBC connections. They usually look something like this:
jdbc:mysql://mysql1.datacenter.example.com:3306/sofjmp?user=username&password=xxxxxsx
You can include the user's database username and password secrets in the connection string you store in the properties file. That gives your customers a way to specify their own database credentials.
Your setup program should include instructions for users about setting that connection string property. You can also include your .sql file with your table definitions in your setup program. You can instruct your customers to run the .sql file when they first set up your program.