Solved

Attempting to configure mysql odbc driver on redhat linux

Posted on 2010-09-16
14
1,101 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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
 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wifi not working on Raspberry Pi 3? 2 57
linux 13 53
Using sort and uniq to pare down large syslog 6 37
T-SQL Default value in Select? 5 28
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

831 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