I really need some help on connecting to a mysql DB using JDBC from a remote location:

Here is a snip of my code:

/** Name of the datasource */
public static String dataSource = "casino";
/** Username */
public static String user = "root";
/** Password */
public static String password = "tecres";
/** The JDBC driver */
public static String dbDriver = "com.mysql.jdbc.Driver";

/* -- for testing purposes */
/** Local url */
public static String local = "jdbc:mysql:///" + dataSource;

/** Remote url */
public static String remote = "jdbc:mysql://" + dataSource;
/* -- */

/** The database URL */
public static String dbUrl = remote;

con = DriverManager.getConnection(dbUrl, user, password);


Basically when I connect using localhost everything is fine(N.B I can connect using my IP address while working on the localhost), but as soon as I move to a remote location and want to connect using my IP address I get a connection timeout error (java.net exception)!

I've tried using the following mySQL commands:

GRANT ALL ON casino.* to "root"@"%" IDENTIFIED BY "tecres";

followed by:

>mysqladmin -u username -p reload

but this hasn't solved the problem! Have I missed anything? Are there any setting in my.ini need to be changed/set?

The firewall on the server is disabled.

Been trying to figure this out for about 5 days, still no luck, any help will be appreciated.