MySQL DB connection in Java

Discussion in 'MySQL' started by zdunham6287, Mar 26, 2007.

  1. zdunham6287

    zdunham6287 New Member

    Feb 7, 2007
    Likes Received:
    Trophy Points:
    Pennsylvania, USA
    Home Page:
    I'm currently writing a java program that will access my database hosted by I have the correct MySQL driver for it to work in java but I can't get the connection to work. This is what I was told to use:
    "jdbc:mysql://mysql server:port/databasename"

    and this is what im using:

    I keep getting a connection timeout every time I run the program. I also send in user name and password. (DriverManager.getConnection(url,username,password). Anyone have any ideas?

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice