RE: CayenneModeler's Reengineer + MySQL server

From: Cris Daniluk (cris.danilu..laraview.com)
Date: Tue Nov 23 2004 - 10:12:44 EST

  • Next message: Williams, Beth: "Parameters with SQLTemplate"

    MySQL uses local sockets to improve local performance, thus bypassing the
    loopback interface. JDBC can't use this, so make sure you are actually
    running MySQL on 3306:

    telnet localhost 3306

    Most likely, your connection won't be accepted. Check your mysql.conf for
    bind-address, port and socket.

    Cris

    > -----Original Message-----
    > From: Alex Gunawan Wibowo [mailto:netzone_tec..ahoo.com]
    > Sent: Tuesday, November 23, 2004 9:22 AM
    > To: cayenne-use..bjectstyle.org
    > Subject: CayenneModeler's Reengineer + MySQL server
    >
    > I encountered this very very awkward error..
    >
    > Hopefully the following give enough information:
    >
    > 1) I run MySQL Server
    > agwibow..ozart:~ $ sudo /usr/bin/mysqld_safe
    > --port=3306 --socket=/tmp/cycorp.sock
    > Starting mysqld daemon with databases from /var/lib/mysql
    >
    > 2) and to verify that it is running:
    >
    > agwibow..ozart:~ $ mysql -u root --port=3306
    > --socket=/tmp/cycorp.sock -p Enter password:
    > Welcome to the MySQL monitor. Commands end with ; or \g.
    > Your MySQL connection id is 2 to server version:
    > 4.0.20-log
    >
    > Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    >
    > mysql>
    >
    >
    > So at this point i'm certain that mysql is running on port 3306.
    >
    > agwibow..ozart:~ $ echo $CLASSPATH
    > .:/home/agwibowo/java_lib/mysql-connector-java-3.0.9-stable/my
    > sql-connector-java-3.0.11-stable-bin.jar:/home/agwibowo/java_l
    > ib/cayenne-1.1RC2/cayenne.jar
    >
    >
    > Now I run CayenneModeller..
    >
    > I give:
    >
    > JDBC Driver: com.mysql.jdbc.Driver
    > DB URL: jdbc:mysql://127.0.0.1:3306/netoffice
    > User name: root
    > Password : blablabla
    >
    > When i do the reengineer, it says "Unable to connect to any
    > hosts due to exception:
    > java.net.ConnectException: Connection refused"
    >
    > I have tried with different MySQL drivers, including
    > mysql-connector-java-3.0.11-stable-bin.jar
    > and
    > mysql-connector-java-3.0.15-ga-bin.jar
    >
    > Both gives the same error message. The 15-ga however, also
    > gives "STACK TRACE", with a lot of exception.
    >
    > I failed to understand what is causing this, since clearly
    > MySQL is running on port 3306, and I've given all priviles to
    > anybody on anyhost to access any database.
    >
    > Could anyone help, please? I've tried debugging this for hours...
    >
    >
    >
    > Thanks in advance!
    >
    > I'm running MySQL that comes with Ubuntu Linux, if that helps.
    >
    >
    > Best regards,
    >
    >
    > Alex.
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > __________________________________
    > Do you Yahoo!?
    > Meet the all-new My Yahoo! - Try it today!
    > http://my.yahoo.com
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Nov 23 2004 - 10:12:43 EST