facebook

[Closed] can’t connect to local mysql db

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

    rateoty
    Member

    hello,

    when I try to connect to a local mysql database, i get an error message (for log entry see below).
    With the user and password I’m using I can connect with the mysql query browser.
    I downloaded the mysql connector and set the driver as described in the tutorial. driver jar is mysql-connector-java-5.0.5-bin.jar.

    my db user name and password are correct, i too tried with the mysql root user but all the same error.

    regards Jürgen

    ————————————————————————————————————
    !ENTRY com.genuitec.eclipse.sqlexplorer 4 4 2007-05-16 16:53:22.190
    !MESSAGE Error while trying to login to database
    !STACK 0
    com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

    ** BEGIN NESTED EXCEPTION **

    java.net.ConnectException
    MESSAGE: Verbindungsaufbau abgelehnt

    STACKTRACE:

    java.net.ConnectException: Verbindungsaufbau abgelehnt
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:519)
    at java.net.Socket.connect(Socket.java:469)
    at java.net.Socket.<init>(Socket.java:366)
    at java.net.Socket.<init>(Socket.java:208)
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:267)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:99)
    at com.genuitec.eclipse.sqlexplorer.actions.LoginProgress$Login.run(LoginProgress.java:43)
    at java.lang.Thread.run(Thread.java:619)

    ** END NESTED EXCEPTION **

    Last packet sent to the server was 0 ms ago.
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2814)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:99)
    at com.genuitec.eclipse.sqlexplorer.actions.LoginProgress$Login.run(LoginProgress.java:43)
    at java.lang.Thread.run(Thread.java:619)

    ————————————————————————————————————
    my system is fedora 6 linux

    eclipse conf is:

    *** Platform Details:

    *** System properties:
    eclipse.buildId=M20070212-1330
    eclipse.commands=-os
    linux

    java.runtime.name=Java(TM) SE Runtime Environment
    java.runtime.version=1.6.0_01-b06
    java.specification.name=Java Platform API Specification
    java.specification.vendor=Sun Microsystems Inc.
    java.specification.version=1.6
    java.vendor=Sun Microsystems Inc.
    java.vendor.url=http://java.sun.com/
    java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
    java.version=1.6.0_01
    java.vm.info=mixed mode
    java.vm.name=Java HotSpot(TM) Server VM
    java.vm.specification.name=Java Virtual Machine Specification
    java.vm.specification.vendor=Sun Microsystems Inc.
    java.vm.specification.version=1.0
    java.vm.vendor=Sun Microsystems Inc.
    java.vm.version=1.6.0_01-b06

    myEclipse is:
    Version: 5.1.1
    Build id: 20070302-5.1.1-GA

    #270226 Reply

    Riyad Kalla
    Member

    Can you translate the error message for us?

    java.net.ConnectException
    MESSAGE: Verbindungsaufbau abgelehnt

    STACKTRACE:

    java.net.ConnectException: Verbindungsaufbau abgelehnt

    #270238 Reply

    rateoty
    Member

    hello,

    it is: “connection refused”

    but I just found the cause of the problem:

    for some reason I have to use 127.0.0.1 instead of localhost. Seems strange to me, but anyway, it is no myEclipse problem since I found the solution with a simple test class for testing the jdbc connector.

    regards Jürgen

    #270239 Reply

    Riyad Kalla
    Member

    Jurgen,
    I’m glad it’s working now.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] can’t connect to local mysql db

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