MySQL gateway connection

Looks like plenty of folks here have similar problems getting the dg4odbc gateway working for MySQL. Hope someone that's tackled this can help me out.
Our configuration is such that we have our gateway machine separate from our Oracle database, and the MySQL machine is yet another server. We have installed and configured the gateway along with the unixODBC gateway and the MySQL connector. Running ./isql from the gateway successfully connects to the MySQL database and returns rows from specified tables.
Our difficulty is with setting up the listener.ora (on the gateway) and tnsnames.ora (on the Oracle host). Here are the contents of those files:
listenter.ora:
SID_LIST_LISTENER =
    (SID_DESC =
      (PROGRAM = dg4odbc)
      (ORACLE_HOME=/db01/app/oracle/product/gateways)
      (SID_NAME = myodbc3)
      (ENVS=LD_LIBRARY_PATH=/opt/unixODBC/lib:/opt/mysql/myodbc5/lib:/usr/local/lib:/db01/app/oracle/product/gateways/lib)
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = gw_host)(PORT = 1521))
  )tnsnames.ora:
dg4odbc =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = gw_host)(PORT = 1521))
    (CONNECT_DATA = (SID= myodbc3))
    (HS=OK)
  )Listener status on the gateway is:
-bash-3.00$ lsnrctl status
LSNRCTL for Solaris: Version 11.1.0.6.0 - Production on 26-APR-2010 15:07:08
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
Alias                     LISTENER
Version                   TNSLSNR for Solaris: Version 11.1.0.6.0 - Production
Start Date                26-APR-2010 14:41:51
Uptime                    0 days 0 hr. 25 min. 17 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /db01/app/oracle/product/gateways/network/admin/listener.ora
Listener Log File         /db01/app/oracle/diag/tnslsnr/ozone4/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gw_host)(PORT=1521)))
Services Summary...
Service "myodbc3" has 1 instance(s).
  Instance "myodbc3", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfullyCan anyone see anything obvious in this configuration that's out of whack?
I logged into sqlplus and create a public database link:
SQL> create public database link mysql
  2   connect to user_name identified by password
  3  using 'dg4odbc';Executing a query via the link gives the following:
SQL> select * from block@mysql;
select * from block@mysql
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding line from MYSQLAnyone seen this before or have any ideas for me? I've read through the docs and this forum and just cannot see where the problem lies.
Earl
P.S. tnsping from the Oracle database to the gateway gives this:
merc@: tnsping dg4odbc
TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 26-APR-2010 15:15:07
Copyright (c) 1997,  2007, Oracle.  All rights reserved.
Used parameter files:
/opt/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = gw_host)(PORT = 1521))) (CONNECT_DATA = (SID= myodbc3)) (HS=OK))
OK (0 msec)

>
Maybe it is sufficient to get the part where the libodbc.so library is loaded, so check where you'll find it in the strace file and provide this info until the error is visible in the traceHopefully this is what you wanted from truss.
23074/1:     stat("/opt/unixODBC/lib/libodbc.so", 0xFFFFFFFF7FFFD4A0) = 0
23074/1:     resolvepath("/opt/unixODBC/lib/libodbc.so", "/opt/unixODBC/lib/libodbc.so.1.0.0", 1023) = 34
23074/1:     open("/opt/unixODBC/lib/libodbc.so", O_RDONLY)     = 9
23074/1:     mmap(0x00100000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 9, 0) = 0xFFFFFFFF7A400000
23074/1:     mmap(0x00100000, 1826816, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFFFFFFFF7A200000
23074/1:     mmap(0xFFFFFFFF7A200000, 719355, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 9, 0) = 0xFFFFFFFF7A200000
23074/1:     mmap(0xFFFFFFFF7A3AE000, 55864, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 9, 712704) = 0xFFFFFFFF7A3AE000
23074/1:     mmap(0xFFFFFFFF7A3BC000, 1552, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFFFFFFFF7A3BC000
23074/1:     munmap(0xFFFFFFFF7A2B0000, 1040384)          = 0
23074/1:     memcntl(0xFFFFFFFF7A200000, 75448, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
23074/1:     close(9)                         = 0
23074/1:     stat("/opt/unixODBC/lib/libdl.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/opt/mysql/myodbc5/lib/libdl.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/usr/local/lib/libdl.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/db01/app/oracle/product/gateways/lib/libdl.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/opt/unixODBC/lib/libthread.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/opt/mysql/myodbc5/lib/libthread.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/usr/local/lib/libthread.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/db01/app/oracle/product/gateways/lib/libthread.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/opt/unixODBC/lib/libc.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/opt/mysql/myodbc5/lib/libc.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/usr/local/lib/libc.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/db01/app/oracle/product/gateways/lib/libc.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/opt/unixODBC/lib/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/opt/mysql/myodbc5/lib/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/usr/local/lib/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) = 0
23074/1:     resolvepath("/usr/local/lib/libgcc_s.so.1", "/usr/local/lib/libgcc_s.so.1", 1023) = 28
23074/1:     open("/usr/local/lib/libgcc_s.so.1", O_RDONLY)     = 9
23074/1:     mmap(0xFFFFFFFF7A400000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 9, 0) = 0xFFFFFFFF7A400000
23074/1:     close(9)                         = 0
23074/1:     stat("/db01/app/oracle/product/gateways/lib/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/lib/64/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     stat("/usr/lib/64/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
23074/1:     munmap(0xFFFFFFFF7A200000, 719355)          = 0
23074/1:     munmap(0xFFFFFFFF7A3AE000, 58892)          = 0
23074/1:     munmap(0xFFFFFFFF7A400000, 32768)          = 0
23074/1:     write(7, "   h o a e r r : 2 8 5 0".., 14)     = 14
23074/1:     time()                              = 1273255397
23074/1:     write(7, " E x i t i n g   h g o l".., 40)     = 40
23074/1:     write(7, " F a i l e d   t o   l o".., 81)     = 81
23074/1:     time()                              = 1273255397
23074/1:     write(7, " E x i t i n g   h g o l".., 49)     = 49
23074/1:     time()                              = 1273255397
23074/1:     write(7, " E x i t i n g   h g o i".., 126)     = 126
23074/1:     getpid()                         = 23074 [5550]
23074/1:     open("/proc/23074/map", O_RDONLY)          = 9
23074/1:     fstat(9, 0xFFFFFFFF7FFFD1F8)               = 0
23074/1:     open("/dev/zero", O_RDWR)               = 12
23074/1:     mmap(0x00000000, 14872, PROT_READ|PROT_WRITE, MAP_PRIVATE, 12, 0) = 0xFFFFFFFF7AC00000
23074/1:     pread(9, "\0\0\001\0\0\0\0\0\0\0\0".., 14872, 0) = 7488
23074/1:     close(9)                         = 0
23074/1:     munmap(0xFFFFFFFF7AC00000, 7592)          = 0
23074/1:     write(7, " h o s t m s t r :      ".., 41)     = 41
23074/1:     write(14, "\0 *\0\006\0\0\0\0\080\0".., 42)     = 42
23074/1:     read(14, "\0 n\0\006\0\0\0\0\0 H\0".., 8208)     = 110
23074/1:     getpid()                         = 23074 [5550]
23074/1:     open("/proc/23074/map", O_RDONLY)          = 9
23074/1:     fstat(9, 0xFFFFFFFF7FFFD4D8)               = 0
23074/1:     open("/dev/zero", O_RDWR)               = 13
23074/1:     mmap(0x00000000, 15080, PROT_READ|PROT_WRITE, MAP_PRIVATE, 13, 0) = 0xFFFFFFFF7A400000
23074/1:     pread(9, "\0\0\001\0\0\0\0\0\0\0\0".., 15080, 0) = 7592
23074/1:     close(9)                         = 0
23074/1:     munmap(0xFFFFFFFF7A400000, 7696)          = 0
23074/1:     write(7, " h o s t m s t r :      ".., 44)     = 44
23074/1:     getpid()                         = 23074 [5550]
23074/1:     open("/proc/23074/map", O_RDONLY)          = 9
23074/1:     fstat(9, 0xFFFFFFFF7FFFD358)               = 0
23074/1:     open("/dev/zero", O_RDWR)               = 15
23074/1:     mmap(0x00000000, 15288, PROT_READ|PROT_WRITE, MAP_PRIVATE, 15, 0) = 0xFFFFFFFF7A300000
23074/1:     pread(9, "\0\0\001\0\0\0\0\0\0\0\0".., 15288, 0) = 7696
23074/1:     close(9)                         = 0There appear to be errors there but I have no idea how to read this output. Thanks again for your help.
Earl

Similar Messages

  • Java Connector via MySQL [ Cannot Connect ]

    I downloaded the MySql connector and extracted the connector and placed it at this directory,
    C:\Program Files\Java\jdk1.5.0_06\jre\lib\ext
    I also set the classpath as such by adding
    ClassPath = .;C:\Program Files\Java\jdk1.5.0_06\jre\lib\ext\mysql-connector-java-3.1.12-bin.jar.Actually , I followed the tutorial at
    http://www.stardeveloper.com/articles/display.html?article=2003090201&page=4.
    I then executed this program below.
    import java.sql.*;
    public class Connect {
      public static void main(String args[]) {
        Connection con = null;
        try {
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         con = DriverManager.getConnection("jdbc:mysql:///enron", "root", "horizon");
          if(!con.isClosed())
            System.out.println("Successfully connected to MySQL server...");
        } catch(Exception e) {
          System.err.println("Captured Exception: " + e.getMessage());
        } finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
    However i was unable to connect..This is wat happened as below..
    C:\>java Connect
    Captured Exception: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.UnknownHostException
    MESSAGE: localhost: localhost
    STACKTRACE:
    java.net.UnknownHostException: localhost: localhost
            at java.net.InetAddress.getAllByName0(Unknown Source)
            at java.net.InetAddress.getAllByName0(Unknown Source)
            at java.net.InetAddress.getAllByName(Unknown Source)
            at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:137)
            at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
            at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
            at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
            at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
            at java.sql.DriverManager.getConnection(Unknown Source)
            at java.sql.DriverManager.getConnection(Unknown Source)
            at Connect.main(Connect.java:7)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 31 ms ago.
    Any Help watsoever is greatly appreciated.
    Thanks in advance.
    Cheers.

    Hi thanks for the reply.
    Although , I am though a bit baffled by your reply.
    Where is it that you want me to add the URL.Not add the URL - change the one you have. Read the docs for the connector and follow that.
    And where else should i place that jar file.I put it in my CLASSPATH, close to where the source for my project is. (That means not in one place, but several places. I duplicate the JAR file for every app that needs it.)
    Cos I follow the tutorial at...
    http://www.stardeveloper.com/articles/display.html?art
    icle=2003090201&page=4.
    Unless You are saying that the above site is wrong..
    If thats the case, can you point out another
    alternative site which can guide me along .No time to read that site, nor do I have the interest.
    The Sun Java tutorial is sufficient for using JDBC. As far as how you package and deploy apps, that's another matter. You should be using the class name and URL that your JDBC driver docs suggest.
    %

  • How to establish a MYSQL Database connection in JSP page.

    Hi People,
    Tell me how to establish mysql database connection in JSP page.
    Needed details on:
    1) what are all the mysql drivers need to be included.
    2) what is the syntax for establish a database connection

    hi,
    http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.htmlsee down for mysql config with tomcat

  • How to reduce the number of Remote Gateway connections from one server

    Hi ,
    We have an XI 3.0 prod system which is being flooded every month end by the invoices generated in our ERP system and occupying all the gateway connections, what I see is that all the remote gateway connections are being established by our ERP server and still there are many requests waiting at the ERP server and failing.
    When we ran the same in  our test landscape, the invoices are getting transferred to XI with out any problems, the remote gateway connections are free even when the invocie Volumes transferred are the same in Prod and Test servers.
    we are not considerint to Increasing the rdisp/max_gateways as the volumes of invocies transferred are really huge and in one of the test, we observed that when 40 invocies are transferred from ERP, it occupied 40 Remote gateway connections in our XI prod
    We are looking for the option similar to our test system of transferring many requests from one connection. Is there any such specific option?
    Regards,
    Santhi Bushan.

    Dear Santhi,
    every gateway establishes only one connection to another gateway. If there are that many gateway/gateway connections, then you are probably connecting from more than one instance. You could circumvent this, if you use gateway options in the RFC destination being used, as this will force all outgoing RFC calls to go through a single gateway. This will then mean that the system has a single point of access.
    Best Regards,
    Tim

  • Error in Mysql database connectivity

    hello,
    there is problem in Mysql database connectivity.
    when i connect JSP program to Mysql database it gives error :
    Server configuration denied access to data source
    please help me asap
    kuldip jain
    [email protected]

    i m also working on Mysql Java but on Window 2000 platform
    here is the Java code which successfully runing on my machine
    import java.sql.*;
    public class TestMySql
         public static void main(String[] Args)
              try
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    Connection C = DriverManager.getConnection(
    "jdbc:mysql://server2:3306/Db?user=root");
    Statement Stmt = C.createStatement();
    ResultSet RS = Stmt.executeQuery("SELECT * from T1");
    while (RS.next()) {
                             System.out.println(RS.getString(1));
    catch (Exception E)
    System.out.println("SQLException: " + E.getMessage());

  • Mysql not connecting

    Hi all
    I have downloaded the J connector, both 5.0.8 and 5.1.13 but they both gives me problems.
    if i try:
    private static String url="jdbc:mysql://localhost:3306/mydb;create=true"; private static Connection conn=null; private Statement stm=null; public static void main(String[] args){ createConnection(); } private static void createConnection(){ try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); //connect conn=DriverManager.getConnection(url); System.out.println("Connected!"); } catch(Exception except){ except.printStackTrace(); } }
    i get the following:
    com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.ConnectException
    MESSAGE: Connection refused
    STACKTRACE:
    java.net.ConnectException: Connection refused
    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:433)
    at java.net.Socket.connect(Socket.java:529)
    at java.net.Socket.connect(Socket.java:477)
    at java.net.Socket.<init>(Socket.java:374)
    at java.net.Socket.<init>(Socket.java:216)
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at conn.Conn.createConnection(Conn.java:28)
    at conn.Conn.main(Conn.java:18)

         private static String url="jdbc:mysql://localhost:3306/mydb;create=true";
    java.net.ConnectException
    MESSAGE: Connection refusedMySQL is not running in 'localhost' on port 3306.

  • Error MySQL #2002 connection could not be made etc from phpMyAdmin

    Error MySQL #2002 connection could not be made etc from phpMyAdmin
    I am just seting up Adobe Flash Builder 4.5 for PHP, Zend Server, MySQL and phpMyAdmin.
    On attempting The Tutorial Build your first Mobile PHP project I am getting this error.
    Can anybody help please ?

    Just thought I would add that I did every test the help files suggest, no firewall etc.
    Strange thing is that after the majority downloaded I had about 55 apps left that could not be updated because of the network connection that could not be made, I downloaded them manually instead of clicking 'yes please do download them all'.
    I still came across a few that gave me the msg that an connection could not be made but when I skipped them and came back later to try again it did download. Took some time but I now have them all up to date.
    Now see if I can sync the iPhone and iPad.
    I run the latest iTunes 10.4.1 (10) and 10.6.8, have not updated to Lion yet.
    cheers,
    Christine

  • Mysql.sock - connection error (code 2002)

    Performed a clean install of SL Server.
    Enabled Web and MySQL services.
    When using GUI (SequelPro of MySQL GUI Tools) I get a mysql.sock connection error.
    "Could not connect to MySQL instance at localhost. Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (code 2002)"
    The database location of MySQL is /var/mysql. Thus a reference to /tmp/mysql.sock is obviously wrong.
    The file /var/mysql/mysql.sock does exist but apparently no reference is made to this file.
    Q: How to make a reference to the correct socket file,
    Coen
    info from Terminal:
    mysql> status
    mysql Ver 14.12 Distrib 5.0.82, for apple-darwin10.0 (i386) using EditLine wrapper
    Connection id: 6
    Current database:
    Current user: s2xladmin@localhost
    SSL: Not in use
    Current pager: stdout
    Using outfile: ''
    Using delimiter: ;
    Server version: 5.0.82-log Source distribution
    Protocol version: 10
    Connection: Localhost via UNIX socket
    Server characterset: latin1
    Db characterset: latin1
    Client characterset: latin1
    Conn. characterset: latin1
    UNIX socket: /var/mysql/mysql.sock
    Uptime: 1 day 3 hours 41 min 7 sec
    Threads: 1 Questions: 12 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.000
    Message was edited by: Coen Jeukens

    It looks looks like the Sequel Pro app is guessing incorrectly that the mysql.sock is in /tmp. If that's the problem, you should be able to fix it by going to Sequel Pro's Connection panel and entering the correct path, which is /var/mysql/mysql.sock.

  • MySQL -- JDBC Connection help !!!

    Hi everybody...Well I have MySQL Server and Java, I get the JDBC and tried this:
    import java.sql.*;
    public class JdbcE {
    public static void main(String args[]) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql://localhost/test", "user", "pass");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    And with that code all works fine...but when I change the Host from LOCALHOST to [ROUTER IP] like this:
    con = DriverManager.getConnection("jdbc:mysql://182.185.145.12/test", "user", "pass");
    I got this exception:
    Exception: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection timed out: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection timed out: conne
    ct
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
    va:156)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    :266)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at JdbcE.main(JdbcE.java:11)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 16 ms ago.
    I don't know how to solve it...
    I have a 2wire 1700HG router, maybe it would be a problem of the firewall can anyone help me to solve this problem??

    Well I sorry...I am very new in this kind of things...I just know that I have a 2wire 1700HG, I have installed MySQL Server, Java and mysql-connector-java...
    When I try this in the connection statement:
    con = DriverManager.getConnection("jdbc:mysql://localhost/test", "user", "test");
    Everything works fine...but when I try this to connect from a remote PC
    con = DriverManager.getConnection("jdbc:mysql://189.145.185.182/test", "user", "test");
    This error comes out on screen:
    Exception: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection timed out: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection timed out: conne
    ct
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
    va:156)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    :266)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at JdbcE.main(JdbcE.java:11)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 16 ms ago.
    I don't know what can I do :S please help!! :D

  • Please help setting up Mysql ASP connection on a Mac DW8

    Dear All
    I have posted previously but I still have not solved this
    problem, and really need anybody with a mac DW setup to give some
    advice. I have spoken to Adobe and trawled the net looking for a
    solution to getting ASP and DW working on a mac. I know I need a
    windows machine and a local network which I have. I have a real
    issue making a database connection from within dreamweaver.
    Please help anybody with experience.
    Many thanks in advance
    Graham

    I don't know how you can define the MySQL database connection
    string in DW,
    because I only use DW for layout purposes (HTML + CSS). But I
    have an
    ASP/VBscript site running against a MySQL database, and it
    successfully uses
    the following connection string:
    "DRIVER={MySQL ODBC 3.51 Driver};SERVER=" & myDBhost
    & ";DATABASE=" &
    myDBname & ";USER=" & myDBuserid & ";PASSWORD="
    & myDBpassword &
    ";OPTION=3;"
    Hope this helps.
    Regards, Marja
    "spydersweb" <[email protected]> wrote in
    message
    news:f21g1i$65i$[email protected]..
    > Dear All
    >
    > I have posted previously but I still have not solved
    this problem, and
    > really
    > need anybody with a mac DW setup to give some advice. I
    have spoken to
    > Adobe
    > and trawled the net looking for a solution to getting
    ASP and DW working
    > on a
    > mac. I know I need a windows machine and a local network
    which I have. I
    > have
    > a real issue making a database connection from within
    dreamweaver.
    >
    > Please help anybody with experience.
    >
    > Many thanks in advance
    > Graham
    >

  • Why my MySQL JDBC Connect fail??

    Dear friends:
    I have following code:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class JdbcExample2 {
      public static void main(String args[]) {
        Connection con = null;
        try {
          Class.forName("com.mysql.jdbc.Driver").newInstance();
          //jdbc:mysql://host_name:port/dbname
    //     con = DriverManager.getConnection("jdbc:MySQL:///test","admin", "admin");
          con = DriverManager.getConnection("jdbc:MySQL://localhost:3306/test","admin", "admin");
          if(!con.isClosed())
            System.out.println("Successfully connected to " +
              "MySQL server using TCP/IP...");
        } catch(Exception e) {
          System.err.println("Exception: " + e.getMessage());
        } finally {
          try {
            if(con != null)
              con.close();
          } catch(SQLException e) {}
    }But when I run , I got following error:
    Exception: com.mysql.jdbc.Driver
    My question is:
    [1]. when I connect to MySQL Server through mySQL Client, I got
    Enter password: *****
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 18 to server version: 4.1.21-community-nt
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql>
    how Can I determine MySQL Server name?? I forgot when I install, maybe MySQL is my SQL Server name
    [2]. Do I need to creat a user DSN name or System DSN name for MySQL Server?? which one is best??
    How to do it??
    [3]. How to make above simple JDBC program runnable??
    Thanks
    sunny
    Message was edited by:
    sunnymanman

    Thanks, see new errors:
    C:\Project\java>java Jdbc11
    Copyright 2004, R.G.Baldwin
    java.sql.SQLException: Access denied for user 'admin'@'localhost' (using password: YES)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:868)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3340)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1238)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2743)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at Jdbc11.main(Jdbc11.java:23)
    C:\Project\java>
    any idea??
    here Jdbc11.java:23 is:
    Connection con = DriverManager.getConnection(
    url,"admin", "YES");
    my userID/Password = admin/admin;
    sunny
    Message was edited by:
    sunnymanman

  • Conecting to mysql database Connection reset by peer

    hi guys,
    I have to connec to sever where , from this place i need to contact a remote database , the databse is behind a firewall , they database in their intranet ,they have give me a valid ip , they have a conection between the valid ip and the intranet system , they give me access to the port in the fire wall , i asked for the port 3306 (mysql default ) port , and tried connecting it but i get exception, should i need to get the 80 port for connection??? please help
    java.sql.SQLException: Communication link failure: java.net.SocketException, underlying cause: Connection reset by peer: Connection reset by peer ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: Connection reset by peer: Connection reset by peer STACKTRACE: java.net.SocketException: Connection reset by peer: Connection reset by peer at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:86) at java.io.BufferedInputStream.fill(BufferedInputStream.java:186) at java.io.BufferedInputStream.read1(BufferedInputStream.java:225) at java.io.BufferedInputStream.read(BufferedInputStream.java:280) at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1391) at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:1413) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:625) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1782) at com.mysql.jdbc.Connection.(Connection.java:450) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411) at java.sql.DriverManager.getConnection(DriverManager.java:517) at java.sql.DriverManager.getConnection(DriverManager.java:199) at org.apache.jsp.store$jsp._jspService(store$jsp.java:107) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java: 201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.jav a:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:17 4) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551) at java.lang.Thread.run(Thread.java:484) ** END NESTED EXCEPTION **

    yeahman i feel the same, but i need to prove them they need to do some work , for that i should show thm its not my problem , can u tell me how the jdbc connector works,or any other way telling them , the port not opened still , how will the server pass the request to the database , some one please help me

  • SAP gateway connection failed in IC Win Client -- How to connect it ?

    Hi experts,
    While accessing the lead questionaires for IC Win client..
    I get the error message as follows
    "  SAP gateway connection failed. Is SAP gatewaystarted?          "
    Can u share with me as how to establish the SAP gateway connection ..
    I am grateful for your help..
    I woul like to thank and appreciate you by rewarding the points
    Thanks and Regards,
    Matthew

    Hi experts,
    While accessing the lead questionaires for IC Win client..
    I get the error message as follows
    "  SAP gateway connection failed. Is SAP gatewaystarted?          "
    Can u share with me as how to establish the SAP gateway connection ..
    I am grateful for your help..
    I woul like to thank and appreciate you by rewarding the points
    Thanks and Regards,
    Matthew

  • Using Oracle ODBC Gateway connecting to a remote Oracle database

    Oracle 11gR2
    RHEL 6.4
    Has anyone use the Oracle ODBC Gateway to connect to another Oracle database?  Any issues with that configuration?  Where do I get the ODBC drivers for Linux?
    (I know, "why not use a dblink?" -- well that would be against company security policies)

    Hi,
       From the Oracle point of view we support using DG4ODBC for Oracle to Oracle connections. However, we have not actually tested it as DG4ODBC is primarily designed for access to non-Oracle databases.
    How DG4ODBC will work between Oracle databases depends on the ODBC driver and what that supports. You will need an ODBC Oracle driver which you can get from various suppliers including Oracle but also vendors such as DataDirect, Easysoft etc. You could try a Google search.
    You say you do not want to use database links but that is how DG4ODBC is used, You cannot do -
    sqlplus user/password@dg4odbc_oracle
    Once Dg4ODBC is setup and configured as in this note - if you are using Linux 64-bit -
    How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install (Doc ID 561033.1)
    then in the Oracle database you create a database link and select from tables in the other Oracle database -
    select * from table@dg4odbc_db_link ;
    Regards,
    Mike

  • MySQL Database Connection (two databases at the same time)

    I have never had to open more than one MySQL database from within the same website before, but I do now.  The website I have is designed where all the content comes from within the main database.  I am building an Inventory system that I want within it's own database, in the event I would ever need to move the application to another server or something, I don't want this data residing in the main database.
    Currently, I open the database connection from within a file called "common.php" that resides in a directory called "lib" that can be accessed from the root directory.  Below is the proposed code that would be placed within the "common.php" file:
    // Define Database Variables
    $dbserver = "127.0.0.1";
    $dbuser  = array('clevelan_user1', 'clevelan_user2');
    $dbpass  = array('P@ssw0rd', 'P@ssw0rd2');
    $dbname  = array('clevelan_database1', 'clevelan_database2');
    // Start Session
    session_start();
    // Connect to Databases
    connectdb($dbserver, $dbuser[0], $dbpass[0], $dbname[0]);
    connectdb2($dbserver, $dbuser[1], $dbpass[1], $dbname[1]);
    // Database 1 Connection
    function connectdb($dbserver, $dbuser, $dbpass, $dbname) {
    // connects to db
      global $connection;
      $connection = @mysql_connect($dbserver, $dbuser, $dbpass) or die ("could not connect to server");
      $db = @mysql_select_db($dbname, $connection) or die ("could not select databsase");
      return $connection;
    // Database 2 Connection
    function connectdb2($dbserver, $dbuser, $dbpass, $dbname) {
    // connects to db
      global $connection2;
      $connection2 = @mysql_connect($dbserver, $dbuser, $dbpass) or die ("could not connect to server");
      $db2 = @mysql_select_db($dbname, $connection2) or die ("could not select databsase");
      return $connection2;
    //End of Code Within the "common.php"
    From within any page of the website, I want to access both connections by placing an include at the top of each page:
    include_once("lib/common.php");
    Currently, when I run the code above, any page within the website (the home page) provides error messages with regards to database connectivity (the pages are looking for there content from within the second database.  It's as if the second database is the only database seen by the website.
    I need help figuring out how I can have two MySQL databases open at the same time (the second database will only be open for short periods of time and then closed).  But the main database is always open.

    Create one project using one copy of the exact tables.
    create 2 different sessions.xml files each pointing to the same project. Set the login information in the sessions.xml files.
    That should work fine.
    Peter

Maybe you are looking for

  • How to share certain info between iPhones...

    My wife and I each have iPhones.  The phones are synced to the same iMac.  We each have our own iCloud accounts.  We currently have one iTunes account.  Here's what we'd like to be able to do...please tell me if it is possible, and how to do it: We w

  • How to play videos in other formats other than mp4 in ipod touch.

    how to play videos in other formats other than mp4 in ipod touch. I have tried an app named VLC streamer. But I never knew how to use it... Can someone suggest anything else?

  • Maintain output condition record for KONS

    Dear all friends, Anybody help me to maintain output condition record for KONS during consignment cycle. when,where and how i can maintain the output condition record for KONS thanx in advance. best regards, Rajesh

  • Where is classes12.zip being accessed by OC4J?

    Hi Does anyone know where OC4J in 9.0.2 or 9.0.3 is reading the jdbc driver?. I think is $ORACLE_HOME/jdbc/lib but I'm not sure.

  • Punching Machine data into sap

    Hi,   My client is using Punching machine system for recoding Employee Timings... How do u integrate that with SAP HR? The client wants the IT's to be updated on a daily basis? What are the config steps that Functional Consultants need to do in it? T