Solved

Attempting to configure mysql odbc driver on redhat linux

Posted on 2010-09-16
14
1,097 Views
Last Modified: 2012-05-10
Here are the mysql properties from ODBC.INI:

[mysqlmydb]
Driver=/usr/lib/libmyodbc3.so
Description=ODBC for MySQL
server=WIN-D2SJSG6EMDD
database=mydb
port=

Here are the mysql related contents of ODBCINST.INI:

(at the top)
[ODBC Drivers]
DataDirect 5.2 DB2 Wire Protocol=Installed
DataDirect 5.2 dBASEFile (*.dbf)=Installed
DataDirect 5.2 FoxPro 3.0 Database (*.dbc)=Installed
DataDirect 5.2 Informix Wire Protocol=Installed
DataDirect 5.2 Oracle Wire Protocol=Installed
DataDirect 5.2 Oracle=Installed
DataDirect 5.2 SQL Server Wire Protocol=Installed
DataDirect 5.2 Sybase Wire Protocol=Installed
DataDirect 5.2 TextFile (*.*)=Installed
MySQL=Installed


[MySQL]
Description    = ODBC for MySQL
Driver         = /usr/lib/libmyodbc3.so
Setup          = /usr/lib/libodbcmyS.so
FileUsage      = 1


My ODBCINI environment variable is set correctly since I have other odbc drivers that are working fine.

I verified that the files libmyodbc3.so and libodbcmyS.so are in the /usr/lib directory.

The error message I get in a third party reporting application is:
"Specified driver could not be loaded."
0
Comment
Question by:opike
  • 8
  • 6
14 Comments
 
LVL 77

Expert Comment

by:arnold
ID: 33702724
Doesn't the application you use have a native capability to access mysql either through the socket and requires an ODBC connection?
Have not used/configured ODBC in some time, but I think you have to include the username/password
the server to which you are connecting while making sure that the user you use has access rights to the mysql server from this location.

What is the application that you use that needs to use an ODBC type connection?
0
 

Author Comment

by:opike
ID: 33703231
I'm 99% sure it is not an authentication (i.e. user/password) issue, since you get a specific message about a failed login when that happens. The driver is not being found or is otherwise not valid.

The application I'm trying to configure the odbc driver with is the oracle enterprise performance management suite a business intelligence reporting toolset that was formerly hyperion. It comes bundled with merant odbc drivers for many database types but unfortunately not mysql.
0
 
LVL 77

Expert Comment

by:arnold
ID: 33703463
Oracle now owns mysql, is there an option to access the mysql directly from the application?

Does your ODBC drive have an option to be configured with verbose logging?
Which version of mysql do you have running and which mysql ODBC driver did you get from mysql.com?
0
 

Author Comment

by:opike
ID: 33706112
I didn't see mysql as one of the default options. Since it is still relatively recent since Oracle acquired both Sun (mysql) and hyperion, it will probably take more time before everything is fully integrated.

I'll look into verbose logging.

The mysql ODBC driver I installed was mysql connector odbc 3.51.12-2.2.

The version of mysql server is 5.1.
0
 
LVL 77

Expert Comment

by:arnold
ID: 33706875
See if the below linked example works

presumably you are using the mysqlmydb as the DSN, but you are not including any username/password so not sure why you would expect an error dealing with login rejection.

http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-dsn-unix.html

0
 
LVL 77

Expert Comment

by:arnold
ID: 33706917
ODBC.ini should use MySQL as the driver reference versus /usr/lib/libmyodbc3.so

[mysqlmydb]
Driver=MySQL
Description=ODBC for MySQL
server=WIN-D2SJSG6EMDD
database=mydb
USER=
Password=
port=
TraceFile=
Trace=Yes
 
also include
TraceFile=
Trace=Yes
 in the odbcinst.ini for MySQL but make sure to use different files.
0
 

Author Comment

by:opike
ID: 33707862
The username and password don't have to be specified in the odbc.ini file. The oracle application prompts for them.

The Driver= field should point to the path of the actual driver file. Here's another ODBC entry in the same file for Oracle Native driver that works:

[repository]
QEWSD=40436
Driver=/opt2/Oracle/EPM/common/ODBC/Merant/5.2/lib/ARora22.so
Description=DataDirect 5.2 Oracle Wire Protocol
AlternateServers=
ApplicationUsingThreads=1
ArraySize=60000
CachedCursorLimit=32
CachedDescLimit=0
CatalogIncludesSynonyms=1
CatalogOptions=0
ConnectionRetryCount=0
ConnectionRetryDelay=3
DefaultLongDataBuffLen=1024
DescribeAtPrepare=0
EnableDescribeParam=0
EnableNcharSupport=0
EnableScrollableCursors=1
EnableStaticCursorsForLongData=0
EnableTimestampWithTimeZone=0
HostName=oracleepm
LoadBalancing=0
LocalTimeZoneOffset=
LockTimeOut=-1
#LogonID=
#Password=
PortNumber=1521
ProcedureRetResults=0
ReportCodePageConversionErrors=0
ReportRecycleBin=0
#ServerName=<none>
ServerType=0
ServiceName=
SID=XE
TimestampeEscapeMapping=0
TNSNamesFile=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/tnsnames.ora
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:opike
ID: 33708407
I added the trace file properties to odbc.ini but I think something about the environment is not set up correctly as the trace file is not even being generated. The odbc driver is not even being found by the application.

I'm trying to come up with a simple utilty that will let me test the connection outside of the oracle application. I may end up having to build a small C utility to do this.
0
 
LVL 77

Accepted Solution

by:
arnold earned 500 total points
ID: 33708522
you can use odbcinst to test the DSN connection.
You can also use isql -v DSN username password
http://www.easysoft.com/developer/interfaces/odbc/linux.html#testing_dsns_unixodbc
0
 

Author Comment

by:opike
ID: 33708659
That helped... I was able to connect with isql so that means that the environment is configured correctly. Still unable to connect with the oracle tools however (argh).
0
 
LVL 77

Expert Comment

by:arnold
ID: 33708707
within the oracle tools do you use a graphical or command line configuration?
Check whether the issue is with case sensitivity?
Does the tool configuration have an option to select Mysql ODBC connector driver from a list directly or must it go through unixODBC?
0
 

Author Comment

by:opike
ID: 33708754
There are actually 2 tools I'm testing with, one uses a gui and the other is run from the command line so I can run it under the same environment as the isql test (that's the one I'm working on right now). You provide an ODBC DSN to the command line tool and then it uses the driver configuration as sepecified in odbc.ini and odbcinst.ini.

0
 

Author Comment

by:opike
ID: 33709246
I'm going to say this issue is solved and that the oracle connectivity issue is a separate one...
0
 

Author Closing Comment

by:opike
ID: 33709247
Solved.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now