facebook

[Closed] Can’t connect to MySQL

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #265960 Reply

    Frank Lawlor
    Participant

    I configured a mySQL driver (MySQL Connector/J) per the help directions and gave it the libs in the MYSQL install (tools/Java/lib).

    I then tried to create a DB browser but it says it cannot connect, check the URL.

    I gave it the same connect information as my application uses and my app can connect just fine, so I don’t understand what the DB browser doesn’t like.

    The URL is jdbc:mysql:///mydb

    I tried adding localhost:3306 and that didn’t help

    I tried both the root and DB userid/password.

    Any suggestions?

    #265982 Reply

    Brian Fernandes
    Moderator

    Hi,

    The URL is of the following format:
    jdbc:mysql://<hostname>[<:3306>]/<dbname>

    which would translate to something like this:

    jdbc:mysql://localhost:3306/mydb

    Hope this helps.

    #265996 Reply

    Frank Lawlor
    Participant

    If you will read my post, that is what I tried.

    My application connects fine, but MyEclipse DB Browser doesn’t.

    Any suggestions?

    #266005 Reply

    Haris Peco
    Member

    flawlor,

    What you set for dirver class name and can you send error log (Help>About Eclipse SDK>Configuration Details>View Error Log), please.

    Thanks,

    #266007 Reply

    Brian Fernandes
    Moderator

    1) What MyEclipse version are you using?
    2) What MySQL version are you attempting to connect to?
    3) What are the name(s) of the driver JAR you added to the driver connection and what is the FQN of the driver class? Usually there is just a single JAR file called mysql-connector-java-[version].jar, but you mentioned adding several files.
    4) Please state the exact string you used in the DB profile, and the string you are able to successfully use in your Java program.
    5) Could you please check your error log for relevant errors and post them here?

    More instructions here: Posting Guidelines

    Thanks.

    #266011 Reply

    Frank Lawlor
    Participant

    Brian & Peco,

    Thanks for the quick resonses.
    When I added the jars it wasn’t clear from the directions what it needed so I gave it all the jars in the MySQL java/lib (as I did for my app). When I removed all the jars except the ql-connector-java-5.0.4-binjar, I was now able to connect.

    Thanks for the help,
    — Frank

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: [Closed] Can’t connect to MySQL

You must be logged in to post in the forum log in