Solved

Attempting to configure mysql odbc driver on redhat linux

Posted on 2010-09-16
14
1,093 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 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
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 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
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 76

Expert Comment

by:arnold
Comment Utility
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 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:opike
Comment Utility
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 76

Accepted Solution

by:
arnold earned 500 total points
Comment Utility
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
Comment Utility
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 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Solved.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

744 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

16 Experts available now in Live!

Get 1:1 Help Now