Connect with the server machine datadase
Guys I am using MY SQL data base system and I wanna access my server machine data base from my client machine.
I used this code to made the connection..
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://10.0.0.1:3306/invoice_ijts", "root","123");
}
catch (Exception e) {
System.out.println("Error in Database Connection "+e);
}
But it doesn't work properly and give me a " Null Pointer Exception" with a flowing error message.
"Error in Database Connection java.sql.SQLException: Data source rejected establishment of connection, message from server: "#HY000Host '10.0.0.10' is not allowed to connect to this MySQL server"
some one can help me out for this matter ?

