Not able to connect to remote MySQL database using Connector/J

I have an application that uses a connection pool for database access.
It is initialized with this context.xml entry:
The db server is running on port 3307.
     <Resource name="jdbc/DB" auth="Container"
                    type="javax.sql.DataSource" username="un" password="pw"
                    removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true"
                    driverClassName="com.mysql.jdbc.Driver"
                    url="jdbc:mysql://localhost:3307/myDB"
                    maxActive="8" maxIdle="4"/>Now after starting the context, I can see I have a connection to my database using the MySQL Administrator. So I know I am connecting.
The problem is, when I try to query any table in the db, I get this message:
java.sql.SQLException
: Table myDB.TABLE_NAME' doesn't exist
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
MysqlIO.java:2921) ...
I know it does in fact exist because I am looking at it. And the code I am using works perfectly fine as long as it is running on a local db server.
Any ideas?

I know it does in fact exist because I am looking at
it. And the code I am using works perfectly fine as
long as it is running on a local db server.
Any ideas?Yes two.
I am bit unclear about the last thing you said... you are testing with two different servers or two different clients?
Anyway here are the possibilities off the top of my head.
1) Some sort of security issue. Surrounding who and from where users can connect to the database in question.
2) Case sensitivity problem. On Windows MYSQl makes all it's table names lower case only. Then it onlu supports the correct case to access them.
For example
CREATE TABLE TestMe
Can then only be accessed with
SELECT * FROM testme
Not TestMe.
This appears to vary with version but i have seen this issue before.

Similar Messages

  • Not able to connect with Sql Server Database

    Hi,
    I'm not able to connect with Sql Server database.during making connection I'm getting the following error:
    "Status : Failure -I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property."
    Please help
    Regards,
    Neeraj Goel

    Hi,
    I'm using Sql Server 2000.
    I downloaded the driver from the given site and still having the same problem. Do I need to copy the driver file in some specific folder.
    Regards,
    Neeraj Goel

  • Not able to connect N70 to pc(xp) using ca-53 cabl...

    Not able to connect N70 to pc(xp) using ca-53 cable
    hi i am having this trouble from a year... i am unable to connect my phone n70 using cable to my pc,.,. even after installing all drivers n pc suite n havin it reinstalled also n again doin d same process.. its not getting detected at all.. please help me out... pleaseeee..been tryin 4m a year..nevr checkd des forumss.. hopin som bdy ll help ,me out.. !!!. !!!!

    The DKU-2 cable is no longer supported and so cannot be guaranteed to be compatible with current PC Suites, you should be using either your current CA-53 or the CA-70.
    Have you had the chance to connect any other phone with the PC using this cable? This would test if thr cable itself might be faulty.
    Otherwise remove PC Suite, PC Connectivitiy Solution and Connectivity Cable Drivers from control panel, run the PC Suite Cleaner program that you can get from the PC Suite support pages on the web site, then reinstall everything.

  • Can't Connect to the Mysql Database using J2SE jdk1.5

    Can anyone tell me why this error occurs ????????????????????
    Following are the codes ;
    package dbconnect2;
    import java.sql.*;
    public class dbconn2 {
    public static final String URL =
    "jdbc:mysql://localhost:3306/test";
    public static final String USERNAME = "test";
    public static final String PASSWORD = "password";
    * @param args the command line arguments
    public static void main(String[] args) throws Exception {
    // TODO code application logic here
    Connection connection = null;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    connection = DriverManager.getConnection(URL,
    USERNAME, PASSWORD);
    Statement stm = connection.createStatement();
    ResultSet rs = stm.executeQuery("select * from emp");
    while (rs.next())
    String strnaam = rs.getString("emp_name");
    System.out.println(strnaam);
    finally {
    if (connection != null)
    connection.close();
    ================================================================================
    This is the run time error ;
    init:
    deps-jar:
    compile:
    run:
    Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at dbconnect2.dbconn2.main(dbconn2.java:39)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 2 seconds)
    please help me to sort this out
    Thanks
    Sishani

    I've solved the DW problem by changing the site folders from
    'db' to 'wwwroot' e.g. 'C:\CFusionMX\db\' is now
    'C:\CFusionMX\wwwroot\
    However I'm now back to my original problem. I've lost my
    mqysql connection in CF Adminstrator. Before I made these changes I
    could connect to my mysql databases using the following settings:
    JDBC URL: jdbc:mysql://localhost:3306/test
    Driver Name: MySQL Connector J
    using the following Java path and file:
    C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar
    Now these settings give me the following error:
    "Connection verification failed for data source: javaserver
    []java.sql.SQLException: SQLException occurred in JDBCPool
    while attempting to connect, please check your username, password,
    URL, and other connectivity info.
    The root cause was that: java.sql.SQLException: SQLException
    occurred in JDBCPool while attempting to connect, please check your
    username, password, URL, and other connectivity info"
    Any suggestions on this would also be welcome.
    Thanks again to everyone for their help.
    Sincerely,
    Graham A. Kerby

  • Need help connecting a remote MySql database from Iphone

    Hi, i need to connect to a remote MySql DataBase in windows from IPhone but..... i'm a noob with Xcode and Objective-C.
    Can someone help me or explain me the way to do it plz?
    Message was edited by: Krovax87
    Message was edited by: Krovax87

    I do not think MCPKit will help you on the iPhone. It is just an Objective-C wrapper around the standard mysql libraries which are not available for the iPhone. Your best bet would be to post on the mysql forums and see if you can get any help.
    You can try extracting the mysql client library source code into a separate static library project, and see if you can get it to build for the iPhone.

  • Connecting to a Mysql database using CF Administrator and DW

    I can't create a mysql datasource in CF Administrator.
    If I use the following datasource settings in CF
    Administrator:
    JDBC URL: jdbc:mysql://localhost:3306/test
    Drive Class: MySQL Connector J
    AND (note the emphasis) I set my local and remote folders in
    my DW site local folder, remote folder and testing server folders
    all to C:\CFusionMX\db\, I can connect to my mysql database in CF
    Administrator.
    However, with these DW site folder settings, DW doesn't
    recognize any databases (Access or Mysql) at all.
    When I change my DW site folder settings to 'wwwroot'
    (e.g.local folder C:\CFusionMX\db\' is changed to
    'C:\CFusionMX\wwwroot') DW now lists all my CF Administrator
    databases.
    The problem is CF Administrator can't connect to my Mysql
    data sources. It gives me the error:
    "Connection verification failed for data source: javaserver
    []java.sql.SQLException: SQLException occurred in JDBCPool
    while attempting to connect, please check your username, password,
    URL, and other connectivity info.
    The root cause was that: java.sql.SQLException: SQLException
    occurred in JDBCPool while attempting to connect, please check your
    username, password, URL, and other connectivity info"
    I've tried changing the 3306 port to 8500, but this doesn't
    help.
    My java path and connector file is:
    C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar,
    Is this a ID/password problem? I've tried both 'root' and
    leaving the ID field in the CF Administrator add data source block,
    both to no avail. I don't have a password set in Mysql for 'root'
    either.
    Any help would be gratefully appreciated. I've been working
    on this for weeks and keep running into one problem after another.
    Thanks a million in advance.
    Sincerely,
    Graham A. Kerby

    1) ensure mysql server is running
    2) there are numerous tutorials for mysql installation out
    there
    3) there are good free mysql admin tools out there
    4) use both the above to verify your mysql installation is
    correct
    5) please tell me you do have your zonealarm DISABLED
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Connecting to a Mysql database using a ColdFusion server

    can't create a mysql datasource in CF Administrator.
    If I use the following datasource settings in CF
    Administrator:
    JDBC URL: jdbc:mysql://localhost:3306/test
    Drive Class: MySQL Connector J
    AND (note the emphasis) I set my local and remote folders in
    my DW site local folder, remote folder and testing server folders
    all to C:\CFusionMX\db\, I can connect to my mysql database in CF
    Administrator.
    However, with these DW site folder settings, DW doesn't
    recognize any databases (Access or Mysql) at all.
    When I change my DW site folder settings to 'wwwroot'
    (e.g.local folder C:\CFusionMX\db\' is changed to
    'C:\CFusionMX\wwwroot') DW now lists all my CF Administrator
    databases.
    The problem is CF Administrator can't connect to my Mysql
    data sources. It gives me the error:
    "Connection verification failed for data source: javaserver
    []java.sql.SQLException: SQLException occurred in JDBCPool
    while attempting to connect, please check your username, password,
    URL, and other connectivity info.
    The root cause was that: java.sql.SQLException: SQLException
    occurred in JDBCPool while attempting to connect, please check your
    username, password, URL, and other connectivity info"
    I've tried changing the 3306 port to 8500, but this doesn't
    help.
    My java path and connector file is:
    C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar,
    Is this a ID/password problem? I've tried both 'root' and
    leaving the ID field in the CF Administrator add data source block,
    both to no avail. I don't have a password set in Mysql for 'root'
    either.
    Any help would be gratefully appreciated. I've been working
    on this for weeks and keep running into one problem after another.
    Thanks a million in advance.
    Sincerely,
    Graham A. Kerby

    If it were me I would use the MySQL JDBC driver and not ODBC. Then DSN versus not-DSN wouldn't be an issue.

  • Not able to connect after changing the password using ALTER VALUES clause

    Hi,
    Just now John explained about VALUES clause in below thread.
    Expired Status
    I created a new account called SURI and tried to use the user account HR's password using VALUES clause. I was able to alter the password but not able to connect SURI with hr password.
    Please see the version details below. And the SQL statements which I have tried.
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 13 18:44:50 2012
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter user-name: sys as sysdba
    Enter password:
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> SELECT password
      2  FROM dba_users
      3  WHERE username = 'HR';
    PASSWORD
    4C6D73C3E8B0F0DA
    SQL> ALTER USER SURI IDENTIFIED BY VALUES '4C6D73C3E8B0F0DA';
    User altered.
    SQL> SELECT password
      2  FROM dba_users
      3  WHERE username='SURI';
    PASSWORD
    4C6D73C3E8B0F0DA
    SQL> conn suri/hr     -- HR account's password is hr only
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SQL>Thanks,
    Suri

    Suri wrote:
    Hi,
    Just now John explained about VALUES clause in below thread.
    Expired Status
    I created a new account called SURI and tried to use the user account HR's password using VALUES clause. I was able to alter the password but not able to connect SURI with hr password.
    Please see the version details below. And the SQL statements which I have tried.
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 13 18:44:50 2012
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter user-name: sys as sysdba
    Enter password:
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> SELECT password
    2  FROM dba_users
    3  WHERE username = 'HR';
    PASSWORD
    4C6D73C3E8B0F0DA
    SQL> ALTER USER SURI IDENTIFIED BY VALUES '4C6D73C3E8B0F0DA';
    User altered.
    SQL> SELECT password
    2  FROM dba_users
    3  WHERE username='SURI';
    PASSWORD
    4C6D73C3E8B0F0DA
    SQL> conn suri/hr     -- HR account's password is hr only
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SQL>Thanks,
    SuriYou can only do it for the same user, as the password is a hashed value that includes the username as part of the hashing (It's either the username or some internal object id or something). So using the hashed value against another user won't work.

  • Not able to connect to Oracle B2B database after restart of my system

    Hi
    I am getting this problem. Because of this problem I reinstalled B2B in my system 4 times till now.
    This time I want to resolve this problem instead of reinstalling.
    1. I instsalled B2B successfully, able to conenc to database, done some configurations in Oracle B2B, everythign is fine.
    2. Restarted my system, I have kept starting of this database process as automatic.
    3. I stopped the metadatarepository and started again, when I am tryign to connec to B2B database it is giving the below error:
    Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    The Connection descriptor used by the client was:
    //B4b-5F-154-153Y.bdc4b.co.in:1521/orcl.bdc4b.co.in
    I verified if it is taking the correct ORACLE_HOME for starting the database, it is correct,
    I executed the below command:
    lsnrctl seervices.
    It is showing only the service, PLSExtProc. not the b2b database service: orcl.bdc4b.co.in.
    tnsnames.ora is having the below two entries:
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = B4b-5F-154-153Y.gdnindia.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl.bdc4b.co.in)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = B4b-5F-154-153Y.gdnindia.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = PLSExtProc)
    could anybody tell me what can be the problem.

    Hi Praveena,
    This appears to be issue database connectivity
    You might want to check if the listener is up. Also check for the error code.
    ORA-12514:     TNS:listener does not currently know of service requested in connect descriptor
    this might of use to you:
    Suddenly getting ORA-12514
    ORA-27101: shared memory realm does not exist
    Regards,
    Dheeraj

  • I not able to connect the remote to new iMac, does anyone know how it's done?

    I have a new iMac and am unable to connect the remote. I have done a search and can find nothing so far that will help me, it's like the new iMac has no IR receiver.
    If this is the case what can I use for a remote?

    mende1 and Mike Sombrio, all sorted, thank you for taking the time to reply to me. I was able to use the remote app I had on my phone, however I had to home share. I think it is much better this way anyway I am able to see what I want from my computer on my phone. I'm happy again

  • Not Able to connect jdev 10g application database, after deployee to weblogic 10g

    Hi,
    I have and application build in developer 10g.(10.1.3.5) using ADF business component 10.1.3.43.6. i want deploy this application in web logic serve 10.3.4
    After install ADF runtime my application was successfull deployed in web logic , But is not abble to connect with oracle database.
    I get this line of error in web logic console:  java.lang.ClassNotFoundException: oracle.jbo.domain.BlobDomain.
    Any advise about this.
    Thanks ervin.

    oracle.jbo.domain.BlobDomain is not a WebLogic class, let alone
    a WebLogic JDBC issue, so you need not do any DS reconfiguration...
    You need to find out where the oracle.jbo classes are, and get them
    into the WebLogic class path...

  • From RMAN - Not able to connect to the target database as sysdba

    I wanted to configuring the backup server (rman catalog database server) to take RMAN
    backups of the varius target databases. while connecting to the target database
    from backup server, i am getting ORA-01031: insufficient privileges error.
    I created password file and modified the init.ora file in the target server, but
    still having connection issue.
    I can over come this issue by keep trying many times while using sqlplus.
    pbackup1$ sqlplus "sys/oracle @HCPRD as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 25 17:02:56 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    ERROR:
    ORA-01031: insufficient privileges
    Enter user-name:
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Enter user-name:
    ERROR:
    ORA-01017: invalid username/password; logon denied
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    pbackup1$ sqlplus "sys/oracle @HCPRD as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 25 17:03:05 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    SQL>
    -- finally, after few attempts, i can connect to the target database server as
    sysdba ---
    While connectiong thru RMAN, get the following error:
    RMAN> connect target sys/oracle@HCPRD
    RMAN-00571: ===========================================================
    RMAN-00569: ========= ERROR MESSAGE STACK FOLLOWS
    RMAN-00571: ===========================================================
    ORA-01031: insufficient privileges
    RMAN> connect target "sys/oracle @HCPRD as sysdba"
    RMAN-00571: ===========================================================
    RMAN-00569: ======== ERROR MESSAGE STACK FOLLOWS
    RMAN-00571: ===========================================================
    ORA-12154: TNS:could not resolve the connect identifier specified
    Text continued in next action...

    Hey,
    Please take a look at URL below to see it can help you -
    http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmcnctg002.htm#i1008102
    or
    http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96566/rcmcnctg.htm#443912
    regards,
    Marcello.

  • Not able to connect to Lotus Domino server using java/corba

    Hi
    I am new to Lotus Domino server and Java.
    I have INstalled Lotus Domino server5 on 1 machine and was successful in installing the Lotus client on another machine.
    Throught the lotus client i am able to connect to the server and send and receive the mails.
    Now I want to connect to the domino server using the Lotus Domino Tolkit for Java/Corba.
    In this Toolkit they have given the sample code program ..
    if I run the code I am getting the error
    java.io.FileNotFoundException: http://<IPADDRESS>/diiop_ior.txtjava.io.FileNotFoundException: http://<IPADDRESS>/diiop_ior.txt
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:691)
    at java.net.URL.openStream(URL.java:942)
    at lotus.domino.NotesFactory.getIOR(NotesFactory.java:314)
    at lotus.domino.NotesFactory.createSession(NotesFactory.java:66)
    at IntroCorbaApp.run(IntroCorbaApp.java:65)
    at java.lang.Thread.run(Thread.java:539)
    lotus.domino.NotesException: Could not get IOR from HTTP Server
    lotus.domino.NotesException
    at lotus.domino.NotesFactory.getIOR(NotesFactory.java:344)
    at lotus.domino.NotesFactory.createSession(NotesFactory.java:66)
    at IntroCorbaApp.run(IntroCorbaApp.java:65)
    at java.lang.Thread.run(Thread.java:539)
    I also tried to find this file in the Domino server directory.
    The file exists in drive:\LotusServer\Domino\Data\Domino\HTML directory..
    I am not getting what exactly is the Problem
    Plz any one help me in this regard..
    thanks in advance

    You should be able to access the diiop_ior.txt file from browser without authentication,only then it will work. This file should not
    be protected.

  • How to connect to the mysql database using applet from remote PC

    Hii All..
    I am also facing a problem.
    My web server and mysql server are running on the same PC.
    when i connect to the database from the same PC.
    Its connection but when i am trying to connect to the database from the different PC its giving error and not finding the driver "com.mysql.jdbc.Driver" because this is there on the server PC and applet runs on the client side..
    So to load the deriver on the client side so that it can run the applet to make the database connection on the remote PC.
    Thanks
    Uttam

    You are missing the library on the client.
    It must be moved to the client.
    Just like any other library that an applet requires.
    And that has nothing to do with JDBC.
    There are certainly way(s) to do it. Perhaps a forum that addresses applets, web usage or guis would provide an answer.

  • Not able to connect with remote speakers after successfully set up

    I just finished setting up successfully (joining existing wireless network) but when I go to Itunes and select my remote speakers it just goes connecting to airport and then stops. Any ideas why?

    You might want to try upgrading to the latest version of JavaMail (1.4.3), which makes use
    of SSL somewhat simpler. Also, the file SSLNOTES.txt included with JavaMail has some
    tips for debugging problems such as this, as does the JavaMail FAQ.
    Most often this error is caused by not having the appropriate certificates in your local trust
    store. The JDK normally comes with the required root certificates, but if you're running in
    an application server environment you might be using a different trust store.

Maybe you are looking for