Cannot Connect to Remote Database Using Eclipse

HI iam using Eclipse 3.0.1 ans sqlexplorer_2.2.4. My Webhosting provider provided MYSQL4.0.1. Well iam tryiong to connect using SQLExporer using Eclipse.
I have entered following details
Name:: MyDBName
Driver :: MMMysqlSQL Driver
URL :: jdbc:mysql://
UserName :: myusername
Password :: mypassword
Iam getting an exception after some time like this::
Unable top Connect to any hosts due to exeption Connection timed out.......
What could be the problem?????
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

is ur dbname is correct .MyDBName.
i think this problem comes if ur dbname does not exist.
Have you got the correct port details too?

Also ensure that there are no firewalls interferring?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Try this function to connect

boolean EstablishConnection() {
  String myUsername = "myusername";
  String myPassword = "mypassword";
    try {
       // replace  "com.mysql.jdbc.Driver" with your own driver
      Class.forName( "com.mysql.jdbc.Driver" ).newInstance() ;
    } catch ( Exception ex ) {
      System.out.println( "DRIVER REGISTRATION EXCEPTION\n" + ex ) ;
      // return false to communicate failure
      return false ;
    // try to connect to database
    try {  
      /* The username and password for the database must be set here */
      String strUserPass = "&user=" + myUsername + "&password=" + myPassword ;
      String strPort = "" ;   // default is :3306
      // try to establish a connection
      conn = DriverManager.getConnection("jdbc:mysql://" + strPort + "/" + strDatabase + "?autoReconnect=true" + strUserPass ) ;
      return true;
    } catch ( SQLException sqlex ) {
      // split the error message on the tab characters and then display it
      String[] sqlexLines = sqlex.toString().split( "\t" ) ;
      System.out.println( "CONNECTION EXCEPTION\n" + sqlexLines[ 0 ] ) ;
      for ( int k = 1 ; k < sqlexLines.length ; k++ ) {
        System.out.println( "\n" + sqlexLines[ k ] ) ;
      // return false to communicate failure
      return false ;
lensiAuthor Commented:

Guys Got it. Its a Firewal issue.

Lenin Chalasani
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.