Is there any way to host my MySql server online or on my PC so that i(other people) can access it over the internet?.If so what
package Bookwl; import java.util.*; import java.sql.*; public class Bookwl{ Connection con = null; ResultSet rs = null; Statement stmt = null; public static void main(String[] args){ /*Enter 1 to find out and 2 to insert one */ int a=2; Scanner scn=new Scanner(System.in); System.out.println("Enter 1 to find out and 2 to insert:"); int option = scn.nextInt(); if(option==1){ try{ Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/hey?autoReconnect=true&useSSL=false","root","army"); Statement stmt = con.createStatement(); String query="SELECT * FROM yolo"; ResultSet rs=stmt.executeQuery(query); while(rs.next()){ String nm=rs.getString("book"); String ph=rs.getString("votes"); System.out.println("The book is"+nm+"with total votes of"+ph); } rs.close(); stmt.close(); con.close(); } catch(Exception e){ System.out.println("You messed up"); } } else if(option==2){ a =2; } else{ } } }