Error connecting to mysql via ODBC
Hi folks,
I set up Oracle Database Gateway for ODBC with mysql driver (I tried mysql-connector-odbc-5.1.11-1.x86_64.rpm (currently used and log output shown) and mysql-connector-odbc-5.2.2-1.x86_64.rpm). I am unable to create a connection to the mysql database.
Here are the parameters:
Oracle database: 11gR2, AL32UTF8 , Suse SLES11 64 Bit
Oracle Database Gateway for ODBC: installed on Suse SLES10, 64 Bit
ODBC DSN: ona_nb
initona_nb.ora in /opt/oracle/product/11.2.0/gtw_odbc/hs/admin:
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO=ona_nb
HS_FDS_TRACE_LEVEL=255
HS_FDS_SHAREABLE_NAME =/usr/lib64/libmyodbc5.so
HS_LANGUAGE=AMERICAN_AMERICA.ISO8859P1
#HS_TRANSACTION_MODEL=READ_ONLY
#HS_FDS_SQLLEN_INTERPRETATION=32
# ODBC specific environment variables
set ODBCINI=/home/oracle/odbc/ona_nb-odbc.ini
set ODBCINSTINI=/home/oracle/odbc/ona_nb-odbc.ini
(I tried diffenet Language settings or no language setting at all, slightly different ..../hs/log trace files)
ODBC file:
ona_nb-odbc.ini :
[ODBC Data Sources]
ona_nb= MySQL ODBC Driver 5.2.2-1
[ona_nb]
Driver = /usr/lib64/libmyodbc5.so
DATABASE = ona_default
DESCRIPTION = MySQL Verbindung zur ona V11 Datenbank auf Christians Notebook
PORT = 3306
SERVER = cwolbert.gsi.de
UID = oreader
PWD = xxxxxx
[ODBC]
TRACEFILE = /tmp/mysql-odbc-ona_nb.trc
TRACE = Yes
ForceTrace = Yes
set LD_LIBRARY_PATH=/usr/lib64:/opt/oracle/product/11.2.0/gtw_odbc/
Listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/11.2.0/dbhome_3)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = gridrep.gsi.de)
(ORACLE_HOME = /opt/oracle/product/11.2.0/dbhome_3)
(SID_NAME = gridrep)
(SID_DESC=
(SID_NAME=ona_nb)
(ORACLE_HOME=/opt/oracle/product/11.2.0/gtw_odbc)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH=/usr/lib64:/opt/oracle/product/11.2.0/gtw_odbc/lib)
Trying
select * from locations@ona_nb
whre ona_nb is the dblink
CREATE DATABASE LINK "ONA_NB.GSI.DE"
CONNECT TO OREADER
IDENTIFIED BY <PWD>
USING 'ona_nb';
I get the error
ORA-28511: RPC-Verbindung zu heterogenem Remote Agent mit SID=ORA-28511: RPC-Verbindung zu heterogenem Remote Agent mit SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pcora11.gsi.de)(PORT=1521))(CONNECT_DATA=(SID=ona_nb))) abgebrochen abgebrochen
ORA-02063: vorherige line von ONA_NB
and here is the trace file from hs/log. I am unable to create any ODBC trace file, fiddling around with differnt settings
Oracle Corporation --- FRIDAY NOV 23 2012 15:37:21.114
Heterogeneous Agent Release
11.2.0.1.0
Oracle Corporation --- FRIDAY NOV 23 2012 15:37:21.113
Version 11.2.0.1.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "255"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
setting HS_IDLE_TIMEOUT to default of 0
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
setting HS_NLS_NCHAR to default of "AL32UTF8"
setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
setting HS_FDS_DATE_MAPPING to default of "DATE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "ona_nb"
Product-Info:
Port Rls/Upd:1/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:ona_nb
Exiting hgogprd, rc=0
hostmstr: 0: HOA After hoagprd
hostmstr: 0: HOA Before hoainit
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=873
HOCXU_DRV_NCHAR=873
HOCXU_DB_CSET=873
HOCXU_SEM_VER=112000
Entered hgolofn at 2012/11/23-15:37:21
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/libmyodbc5.so"
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLAllocHandle
symbol_peflctx=0xaab3f456
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLBindCol
symbol_peflctx=0xaab44ce3
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLBindParameter
symbol_peflctx=0xaab4342c
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLCancel
symbol_peflctx=0xaab3e6e5
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLDescribeParam
symbol_peflctx=0xaab4346b
.... many similar stuff
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLStatisticsW
symbol_peflctx=0xaab477de
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Entered hgolofns at 2012/11/23-15:37:21
libname=/usr/lib64/libmyodbc5.so, funcname=SQLTablesW
symbol_peflctx=0xaab47a16
hoaerr:0
Exiting hgolofns at 2012/11/23-15:37:21
Exiting hgolofn, rc=0 at 2012/11/23-15:37:21
HOSGIP for "HS_OPEN_CURSORS" returned "50"
HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
Invalid value of 64 given for HS_FDS_SQLLEN_INTERPRETATION
treat_SQLLEN_as_compiled = 1
Exiting hgoinit, rc=0 at 2012/11/23-15:37:21
hostmstr: 0: HOA After hoainit
hostmstr: 0: HOA Before hoalgon
Entered hgolgon at 2012/11/23-15:37:21
reco:0, name:OREADER, tflag:0
Entered hgosuec at 2012/11/23-15:37:21
Exiting hgosuec, rc=0 at 2012/11/23-15:37:21
HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
using OREADER as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
Entered hgocont at 2012/11/23-15:37:21
HS_FDS_CONNECT_INFO = "ona_nb"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2012/11/23-15:37:21
dsn:ona_nb, name:OREADER
optn:
Entered hgocip at 2012/11/23-15:37:21
dsn:ona_nb
Exiting hgocip, rc=0 at 2012/11/23-15:37:21
##>Connect Parameters (len=33)<##
## DSN=ona_nb;
#! UID=OREADER;
#! PWD=*
Exiting hgogenconstr, rc=0 at 2012/11/23-15:37:21
Entered hgopoer at 2012/11/23-15:37:21
hgopoer, line 233: got native error 0 and sqlstate H; message follows...
Exiting hgopoer, rc=0 at 2012/11/23-15:37:21
hgocont, line 2752: calling SqlDriverConnect got sqlstate H
Using no HS_LANGUAGE or HS_LANGUAGE=AMERICAN_AMERICA.AL32UTF8
I still get the same error meassages and logs.
Can you help please?
Cheers Michael
Hi Klaus,
I think the unixODBC driver manager is installed
I have:
oracle@pcora11:/opt/oracle/product/11.2.0/gtw_odbc/hs/log> odbcinst -j
unixODBC 2.2.11
DRIVERS............: /etc/unixODBC/odbcinst.ini
SYSTEM DATA SOURCES: /etc/unixODBC/odbc.ini
USER DATA SOURCES..: /home/oracle/.odbc.ini
and
cat /etc/unixODBC/odbcinst.ini
[MySQL ODBC 5.1 Driver]
Driver = /usr/lib64/libmyodbc5.so
UsageCount = 1
but the two file for SYSTEM and USER DSN are empty.
I tried now:
HS_FDS_SHAREABLE_NAME =/usr/lib64/libodbc.so
and
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
and the result is still the same, what I posted in the prevoius answer to Mike,
ORA-28500: Verbindung von ORACLE zu Fremdsystem gab diese Nachricht zur³ck:
[unixODBC][MySQL][ODBC 5.1 Driver]Access denied for user
'OREADER'@'pcora11.gsi.de' (using password: YES) {HY000,NativeErr = 1045}
ORA-02063: vorherige 2 lines von ONA_NB
and in the trace file:
##>Connect Parameters (len=33)<##
## DSN=ona_nb;
#! UID=OREADER;
#! PWD=*
Exiting hgogenconstr, rc=0 at 2012/11/26-13:25:50
Entered hgopoer at 2012/11/26-13:25:50
hgopoer, line 233: got native error 1045 and sqlstate HY000; message follows...
[unixODBC][MySQL][ODBC 5.1 Driver]Access denied for user 'OREADER'@'pcora11.gsi.de' (using password: YES) {HY000,NativeErr = 1045}
Exiting hgopoer, rc=0 at 2012/11/26-13:25:50
hgocont, line 2752: calling SqlDriverConnect got sqlstate HY000
Exiting hgocont, rc=28500 at 2012/11/26-13:25:50 with error ptr FILE:hgocont.c LINE:2772 FUNCTION:hgocont() ID:Something other than invalid authorization
Exiting hgolgon, rc=28500 at 2012/11/26-13:25:50 with error ptr FILE:hgolgon.c LINE:781 FUNCTION:hgolgon() ID:Calling hgocont
hostmstr: 0: HOA After hoalgon
RPC Calling nscontrol(0), rc=0
hostmstr: 0: RPC Before Exit Agent
hostmstr: 0: HOA Before hoaexit
Entered hgoexit at 2012/11/26-13:25:50
Exiting hgoexit, rc=0
hostmstr: 0: HOA After hoaexit
hostmstr: 0: RPC After Exit Agent
Even if I copy the content of ona_nb-odbc.ini file to /etc/unixODBC/obc.ini
I still get the same error.
Any ideas?
Michael
Similar Messages
-
Connection to MySQL via ODBC not working
Hello all together,
I've got a problem with the ODBC connection to MySQL. The connection via ODBC is established and things like tnsping are working.
When I select some data within the SQL*Plus environment, I get no real result. For example "select table_name from all_tables@mysql;" returns nothing.
My entry in listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME=odbc_mysql)
(ORACLE_HOME=D:\oracle\product\11.0.1\db_1)
(PROGRAM=dg4odbc)
My entry in tnsnames.ora:
MYSQL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA = (SID=odbc_mysql))
(HS=OK)
The initodbc_mysql.ora in ORACLE_HOME/hs/admin/:
HS_FDS_CONNECT_INFO = odbc_mysql
HS_AUTOREGISTER = TRUE
HS_DB_NAME = hsodbc
I tried some modifications but I still get no data from mysql database. When I try "select * from customer@mysql;" I get the correct number of records, the correct column names, but the content is always "¬¬¬¬". The odbc driver works, because with MS Access I can fetch the data. I'm using Oracle 11g Release 1 EE and MySQL ODBC 5.1.5.
What could be the reason for this?
Greetings,
Joergcreated in my UTF-8 Mysql DB your table and inserted a record; the select shows:
SQL> select * from "movieclass"@mysql;
idClass
ClassName
123
H e l l o
As you can see the content is there, the "space" between the letters is related to unicode. Each character is interpreted by 2 bytes and SQL*Plus wrongly displays both. Using iSQLPLus or SQLDeveloper does not show the "space" between the letters.
Here the data type mapping:
SQL> desc "movieclass"@mysql;
Name Null? Type
idClass NUMBER(3)
ClassName NOT NULL NVARCHAR2(50)
What's the exact version of DG4ODBC you're using? 11.1.0.7?
According to the listener file you're using DG4ODBC on Windows. There was a high/low byte issue in DG4ODBC for Windows. This issue is fixed in 11.1.0.7 and a certain patch. So I recommend you to get first the 11.1.0.7 patchset (if you don't already have it installed):
6890831 Oracle Database Family: Patchset
11.1.0.7.0 PATCH SET FOR ORACLE DATABASE SERVER 11.1.0.7.0
and then please apply also the latest patch:
8689191 Oracle Database Family: Patch
ORACLE 11G 11.1.0.7 PATCH 16 BUG FOR WINDOWS 32 BIT 11.1.0.7.0
There was a high/low byte issue
Edited by: kgronau on Aug 11, 2009 10:28 AM -
Can Dreamweaver CS5 connect to MySQL via ODBC?
I am unable to make a direct connection to an external MySQL database because most hosting provider does not allow this type of connection due to security reasons. I am however able to make an ODBC connection to the database (which I am currently using to connect filemaker to our MySQL database).
How can I tell Dreamweaver CS5 to connect via the ODBC driver so I can see the MySQL content in my Dreamweaver project?
I am on a Mac running OS X 10.6.4.GeorgeRudd wrote:
How can I tell Dreamweaver CS5 to connect via the ODBC driver so I can see the MySQL content in my Dreamweaver project?
You can't - at least not if you want to use Dreamweaver's server behaviors. Dreamweaver uses the original PHP MySQL extension. If you want to connect in any other way, you need to hand code everything yourself.
On the other hand, if you want to see the contents of your remote database in Dreamweaver, define your remote server as the testing server. Dreamweaver uploads a hidden folder to the remote server to connect to the database. Because the script is on your remote server, it's local to the MySQL database, so gets round the security issue. It then sends the details to your local computer.
A better solution, though, is to establish a local testing environment. It's more responsive and much more secure. http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html.
By the way, the failure to get a reply is due, in part, to posting your question in the wrong forum. The forum for issues related to PHP/MySQL and other server-side technologies is http://forums.adobe.com/community/dreamweaver/dreamweaver_development. -
Problem remote connection to SQL via ODBC
Hello, I have a server machine on which I installed the "SQL Server 2008 R2 Express." On the same machine I have configured a connection to the SQL server via ODBC and I developed a VI that uses the "LABSQL ADO function" and it perfectly communicates via ODBC with the database.
The problem is when I try to connect to the database from a remote PC. Even on the remote PC I configured the connection via ODBC. I launch the same VI I described above, it performs correctly the ADO Connection Open the ADO connection, but the SQL Execute returned an unknown error: -2147217865. It seems that it can not find the table on which I am doing the query.
Does anyone have any idea? I have no experience with databases and do not know what tests to do.
Thanks a lot.Hi,
actually the Microsoft error code seems to be related to not-existing table (see here).
Anyway, this error code may result when trying to use tables with spaces or other special characters ("-", "/", "\", "?" ) in their names.
Is this true also in the database you are using?
Could it be an issue with permission levels?
I hope it helps!
Bye,
Licia -
Remotley connect to mySql via mm.mysql
Hello,
I'm running WIN2k, JDK 1.2.1_004 and I'm trying to make a local java application to connect to mysql on my web server via mm.mysql. But it doesn't work
I get the following error:
SQLState: 08001
Message: No suitable driver
Vendor: 0
I've tried to connect via the ip:
Connection con = DriverManager.getConnection ("jdbc:mysql://64.176.118.240:3306/grattiskort_com?user=grattis&password=");
And domain name
Connection con = DriverManager.getConnection ("jdbc:mysql://grattiskort.com:3306/grattiskort_com?user=grattis&password=");
I have enabled remote connection in mysql config.
Do I need to install the driver on my web server too, and if so, how do I do that?
Does anyone have a clue what's wrong?
Regards,
ChrilleMessage: No suitable driverWhere do you load the driver?
-
Error connecting to MySQL database
Well I am a beginner trying to get the basics of JDBC. I am following a simple connection tutorial and I cannot even make this work. I receive an error when I run the program. It is a nested error that begins with "java.io.EOFException". I'm thinking it has something to do with the URL I am using to connect to the database. Any ideas?
Here is the code I am using if that helps at all.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class jdbctry {
public static void main(String args[]) {
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://url:port/database",
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) {}
} edit- I think the problem was I had a bad port number assigned to the URL. This time I got a "java.net.SocketException" error. It says my connection timed out.
Message was edited by:
lw22I'll assume that you've substituted appropriate values into that connection URL, right?
It s
// host = IP address or name of machine where MySQL is listening
// port = 3306 (default)
// database = instance you wish to connect to
// username, password have to be GRANTed access rights.
String url = "jdbc:mysql://host:port/database";Can you connect using the MySQL client and see the database you want in Java? If the client can't connect, neither can JDBC.
% -
Connecting to MySQL via DW after Leopard install
I cannot connect to MySQL 5.041 through DW CS3 after
upgrading to Leopard. MySQL Admin and MySQL Query Browser both can
connect and make queries to the database. I just can't connect
through Dreamweaver. I get the "MySQL Error#: 2002" error which
states "Can't connect to local MySQL server through socket
'/var/mysql/mysql.sock' (2). Problem is there is no such
path.There may be an updated needed for dreamweaver, however, I
did find some info about MySQL running on Leopard:
http://bugs.mysql.com/bug.php?id=32019
and some workarounds that I have not tested as being valid:
http://angry-fly.com/index.cfm/2007/10/26/Fix-for-MySQL-on-Leopard -
Plz help me--error connecting to MySQL server
While trying to connect to the MySQL server database,
SqlConn = DriverManager.getConnection("jdbc:mysql://" + "database_server_addr/database_name?user=kiosk&password=!xyzabc");
I get the following error.
Error while connecting to mysql
Communication link failure: null
Notice the ! symbol(exclamation mark) present in the connection string above for the password value i.e., !xyzabc
Is the problem with the ! symbol in my password, coz I am able to connect
if I changed my password omitting the ! symbol. But I would like to connect with the ! symbol in the password. Any quick help is appreciated.
Thanks,
Bussa.
[email protected]specify the database Server address, you can't do it with the "HTTP URL"
String url = "jdbc:mysql://xxx.xxx.xxx.xxx";
Class.forName("mySql spec");
Connection con = DriverManager.getConnection(url,"user", "pass"); -
hi everyone,
im trying to access the mysql database using the myodbc driver and the jdbc-odbc bridge. (yah yah, i know a jdbc driver exists, but lets not get into that since its a long story)
1. if i use a DSN, everythings fine until the actual connection and then i get the following message even though the dsn has a username specified in it
[MySQL][ODBC 3.51 Driver]Access denied for user: '[email protected]' (Using password: NO)
2. if i go DSN-less (which i prefer), i dont know the right way to specify everything in the connection string and i always get the following error irrespective of the combination i try
[Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified
help....hi everyone,
im trying to access the mysql database using the
myodbc driver and the jdbc-odbc bridge. (yah yah, i
know a jdbc driver exists, but lets not get into that
since its a long story)
1. if i use a DSN, everythings fine until the actual
connection and then i get the following message even
though the dsn has a username specified in it
[MySQL][ODBC 3.51 Driver]Access denied for user:
'[email protected]' (Using password: NO)
this also seems to indicate that it isn't getting a password either.
2. if i go DSN-less (which i prefer), i dont know the
right way to specify everything in the connection
string and i always get the following error
irrespective of the combination i try
[Microsoft][ODBC Driver Manager]Data source name not
found and no default driver specified
as far as this goes take a look at these strings. the examples as VB but the strings should be okay.
http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForMySQL
also i'm sorry but I can't think of a good reason not to use the pure Java JDBC driver for MySQL. have you had problems setting it up/ installing it? -
Error Connecting to MySql (character set index '49')
I downloaded the Oracle Sql Developer extensions and went to Tools / Preferences / Third Part and set the location for the Jar file.
When I try and test the connection to the MySql database I get this error:
An error was encountered performing the requested operation:
Unknown initial charater set index '49' received from the server.
Initial client character set can be forced via the 'characterEncoding' property.
Vendor code 0
My dba's used Sql developer to connect to the same MySql database fine. If I use MySql Workbench, I can connect. (I prefer Sql Developer, so I was hoping to get this connection to work.)
I even tried going to MySql to get their Connection/J JDBC jar file; but the same results.
Any suggestions?
Thanks,
MikeAre your colleagues using the same sqldev/JDBC versions? Which?
Did you follow the guide on setting it up, and the driver from http://dev.mysql.com/downloads/connector/j/ ?
K. -
I'm currently programming a GUI to access a database. Therefore I executed a query, which worked fine. But when I tried to exit my program with
System.exit(0)my DOS-Prompt crashes without exiting.
Now I tried it with a kind of minimalistic Connection like that:
Class.forName("org.gjt.mm.mysql.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/stock");
conn.close();Here the same problem occurs, so it must be the Connection that causes the error.
If I would exit the program right away after the Connection, that is
Class.forName("org.gjt.mm.mysql.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/stock");
conn.close();
System.exit(0);then the program exits properly. Unfortunately it doesn't make any sense to quit the program right after reading the data.
So, as you can guess, I'm quite confused. I used the same driver and the same database in another program on the same computer, and it works fine. So I'm left totally clueless.
I'm not using a special programming environment, I just write my code using UltraEdit. I've got installed Java 1.4.0 on my machine.
Any help is very appreciated
MartinI don't get any.
It just crashes. There's neither an exception thrown nor any other error msg. -
Oracle and MySql via ODBC - Field with special characters
Hi,
I recentely installed and configured DG4ODBC 11.2 in my environment, with Oracle 10g as Database. I have a working ODBC and I can successfully select from tables@mysql.
I have a problem with some fields in the mysql table though: various fields are named "Attività", "Località" and so on. Please, note the "à" character.
Now if I select @mysql from some table with normal field name everything works fine. But in some case I have this error:
[MySQL][ODBC 5.1 Driver][mysqld-5.0.77]Unknown column 'A1.attivit??A commessa'
in 'field list' {42S22,NativeErr = 1054}
The field true name is "attività commessa" and if in a test database I rename the field changing that "à" with a normal "a" everything start working. But of course, that is a production database and I can't change the field name.
Anyone faced that problem before?
My init entry:
HS_FDS_CONNECT_INFO = myodbc5
HS_FDS_TRACE_LEVEL = off
HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc5.so
HS_FDS_SQLLEN_INTERPRETATION=32
HS_FDS_FETCH_ROWS=1
HS_LANGUAGE=ITALIAN_ITALY.I8EBCDIC280
set ODBCINI=/usr/local/etc/odbc.ini
set SQL_MODE='ANSI_QUOTES'
Note: I added HS_LANGUAGE and SQL_MODE but tried even without those entries and it's still not working.
My odbc.ini:
[myodbc5]
Driver = /usr/lib64/libmyodbc5.so
Description = MySQL Driver DSN
SERVER = xxx.xxx.xxx.xxx
PORT = 3306
USER = user
Password = pass
Database = sm_test
OPTION = 3
SOCKET =
CHARSET = latin1
P.S.: Please don't kill me, I'm not the creator of the Mysql database with those field names!I've created your test table in my Oracle database using this extra character and I'm able to describe it properly.
SQL> desc test;
Name Null? Type
ATTIVITÀ VARCHAR2(40)
My character set being used is:
SQL> select * from v$nls_parameters;
NLS_CHARACTERSET
WE8ISO8859P15
NLS_NCHAR_CHARACTERSET
AL16UTF16
NLS_LENGTH_SEMANTICS
BYTE
So as long as it doesn't work for you in your native Oracle database I don't think it would work with DG4ODBC. So yes, it would be best to log a service request so that the Oracle database support can check out the NLS issue.
Edited by: kgronau on Sep 28, 2011 9:21 AM
To be complete here the describe of the MySQL table native and using DG4ODBC:
mysql> create table TEST (attività Varchar(40));
Query OK, 0 rows affected (0.00 sec)
mysql> desc TEST;
---------------------------------------------------+
| Field | Type | Null | Key | Default | Extra |
---------------------------------------------------+
| attività | varchar(40) | YES | | NULL | |
---------------------------------------------------+
1 row in set (0.00 sec)
SQL*Plus: Release 11.2.0.2.0 Production on Wed Sep 28 09:20:17 2011
SQL> desc "gateway"."TEST"@MYSQL_DG4ODBC_EMGTW_1122_DB;
Name Null? Type
attività VARCHAR2(80)
So in general it should work. -
Error connecting to MySQL database using JNDI
Hi,
I'm trying to do a simple connection to a MySQL database using the JNDI look-up
method.
Have tried this with the PointBase database that came with WebLogic and got it
to work successfully.
However got the attached error message when I tried it on MySQL database. I tried
this with both the WebLogic's driver for MySQL and also the one I downloaded from
MySQL (com.mysql.jdbc.Driver), and both failed with the same error message.
Offhand, it doesn't look like the connection pool is failing. Tested it with WebLogic's
"Test Pool" function and it was alright.
Also MySQL database is working properly. Test this by doing simple connection
and retrieval with simple JDBC connections and it works.
Any ideas what else I can check with regards to this problem?
Thanks!
[att1.html]Hi Joe,
Attached is the config.xml for the domain that I'm working with. There are 3 connection
pools set-up.
The problematic Connection Pools are "MySQLCP" and "My JDBC Connection Pool"
Thanks for your help in this!
Joe Weinstein <[email protected]> wrote:
show us the pool definition, as it is in the config.xml file.
thanks
joe
Everbright wrote:
Hi,
I'm trying to do a simple connection to a MySQL database using theJNDI look-up
method.
Have tried this with the PointBase database that came with WebLogicand got it
to work successfully.
However got the attached error message when I tried it on MySQL database.I tried
this with both the WebLogic's driver for MySQL and also the one I downloadedfrom
MySQL (com.mysql.jdbc.Driver), and both failed with the same errormessage.
Offhand, it doesn't look like the connection pool is failing. Testedit with WebLogic's
"Test Pool" function and it was alright.
Also MySQL database is working properly. Test this by doing simpleconnection
and retrieval with simple JDBC connections and it works.
Any ideas what else I can check with regards to this problem?
Thanks!
Error 500--Internal Server Error
java.sql.SQLException: Cannot obtain connection: driverURL = jdbc:weblogic:pool:MyJDBCConnection Pool, props = {enableTwoPhaseCommit=false, jdbcTxDataSource=true,
connectionPoolID=MyJDBC Connection Pool, dataSourceName=MyJDBC Data
Source}.
Nested Exception: java.lang.RuntimeException: Failed to Generate WrapperClass
at weblogic.utils.wrapper.WrapperFactory.createWrapper(WrapperFactory.java:141)
at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(JDBCWrapperFactory.java:73)
at weblogic.jdbc.pool.Driver.allocateConnection(Driver.java:242)
at weblogic.jdbc.pool.Driver.connect(Driver.java:158)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:444)
at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
at jsp_servlet.__index._jspService(__index.java:142)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
at weblogic.jdbc.jts.Driver.wrapAndThrowSQLException(Driver.java:395)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:448)
at weblogic.jdbc.jts.Driver.connect(Driver.java:138)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
at jsp_servlet.__index._jspService(__index.java:142)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
[config.xml] -
Errors connecting to Oracle via perl DBI
Hi List.
I've installed Oracle on my linux box (SuSE 10) and I've installed
DBD::Oracle.
I can run sqlplus as the oracle user however when I try and connect via
DBD::Oracle in a perl script I always get errors as follows:
connect string =
my $dbh = DBI->connect("dbi:Oracle:ORCL", 'oracle', 'oracle' );
error =
DBI connect('ORCL','oracle',...) failed: ORA-12541: TNS:no listener (DBD
ERROR: OCIServerAttach) at ora1.pl line 7
Connection Failed...
connect string =
my $dbh = DBI->connect("dbi:Oracle:HOST=linux.site;SID=ORCL;PORT=1522",
'oracle', 'oracle' );
error =
DBI connect('HOST=linux.site;SID=ORCL;PORT=1522','oracle',...) failed:
ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach) at ora1.pl line 7
Connection Failed...
Maybe I have the connect string wrong?
Below is a listing of my code, and my tnsnames.ora:
Thanks in advance for your help.
############ code listing ################ #!/usr/bin/perl
use DBI;
print "Started\n";
my $dbh = DBI->connect("dbi:Oracle:HOST=linux.site;SID=ORCL;PORT=1522",
'oracle', 'oracle' );
if ($dbh) {
print "Connected...\n";
else {
print "Connection Failed...\n";
exit;
my $qry = $dbh->prepare("select count(*) from dba_tables");
$qry->execute();
my @data = $qry->fetchrow_array();
print "[$data[0]] [$data[1]] [$data[2]]\n";
exit;
######### tnsnames.ora listing #####################
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux.site)(PORT = 1522))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux.site)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)'TNS: no listener' usually means that your listener hasn't been started. Try a lsnrctl status to find out whether your Listener is actually running.
-
Unidentified error connecting to MySql
I’m almost embarrassed to post this question because
there seems to be plenty of the same issue already here. On the
other hand I’m not as embarrassed as the developer who
created such a useless message as “unidentified error”
.... but that’s another story.
I’ve reviewed those other messages & solutions and
still get this error.
I’m running Dreamweaver MX version 6.1 under Windows XP
and trying to connect to a local MySql database.
I have no problem connecting to the local database using
several other applications (including Navicat) so I think my set up
is okay.
I’ve also tested the connection with my browser (
http://localhost/mysite_root/test-connect.php)
and that test was successful.
I have defined the document type (PHP of course) and testing
server models.
I am attempting to use the + sign in the databases tab and
navigate to the MySql database and that is when the
“unidentified error” occurs.
I have tried removing the connection scripts.
I have downloaded and applied updates from the Adobe web
site.
One posting mentioned modifying the php.ini file, but it is
unclear what to change or even why that would be necessary since
everything else works.
I admit that establishing this MySql connection should be a
no-brainer that takes minutes not hours. But I’m out of
ideas.TheLark wrote:
> I appreciate the reply. My URL prefix is exactly as you
said it should be.
> And for whatever its worth, the local root folder and
the testing server folder
> point to:
> C:\Program Data\Websites Apache\htdocs\mysite_root\
Your settings seem to be correct. Other likely causes of the
"Unidentified error" are:
* MySQL isn't running (since you can connect with Navicat,
that's
probably not applicable).
* A software firewall is preventing connection between
Dreamweaver and
MySQL.
* You have old versions of the hidden connection scripts. I'm
not sure
if this option is available in MX 6.1, but go to Site >
Advanced, and
select Remove Connection Scripts. Then create a new MySQL
Connection in
Dreamweaver. This replaces the contents of a hidden folder
called
_mmServerScripts, which controls communication between
Dreamweaver and
MySQL.
The reason you get "Unidentified error" is because
Dreamweaver cannot
even communicate with MySQL, and therefore cannot identify
the problem.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Maybe you are looking for
-
Error when running a newly created mobile project
Hi, Every time I create a new mobile project in Flash Builder and try to run it I get this error message: TypeError: Error #1009: Cannot access a property or method of a null object refe rence. at com.coursevector.flashbug::Profiler/allComp
-
AQ Adapter error on AIA 2.5 when Siebel sumbits orders into AIA queue
Hi all, we have an AIA 2.5 (with Patch Set 2) environment based on Oracle SOA Suite 10.1.3.4 MLR10 (single node) and Siebel 8.1.1.4 with ACR 474 components. When an order is submitted on Siebel to AIA Database Queue no issue is present on Siebel side
-
G'day How does one - in CF - refer to an inner class (ClassFoo.Bar) of a given class (ClassFoo), when the constructor of ClassFoo takes an argument of type ClassFoo.Bar? For example the first, third,fourth and fifth constructors shown here: http://ti
-
CS3 upgrade wont accept older serial number in stage 2 :(
Hi folks, I have been happily using Photoshop CS for years and then got a retina with Mavericks... So I had to up the ante but since I couldn't afford CC or CS5+ I got myself CS3 on eBay. Now- it was sold as "full retail" but turns out is only an up
-
for some reason, some of my event folders are blank on the events page and the event folders no longer show the thumbnails, just hash-mark empty frames. This is just a few events all of a sudden out of many events. Any idea whats going on and how to