MySQL Forums
Forum List  »  Connector/ODBC

Urgent: Problems with connecting other plattforms to mysql with MyODBC
Posted by: Michael Stricker
Date: October 27, 2004 06:24AM

Hello,

I'm using MySQL (4.0.21) on LINUX, and I want connect simply to this database from following plattforms with MyODBC:

AIX 5.2
HP 11.11b
NT (WinXP Prof)
Solaris 2.8

The connection only works from WinXP, all other connections doesnt work:

All the released MyODBC-Connectors are terrible and don't work!
The dokumentation is not clear and also terrible!!! All examples works only with localhost installation! I read the MyODBC dokumentation several times, but I can't find a solution. I always believed that I just have to use a simple driver lib in odbc.ini, and then connection is working.

With OpenLink and Oracle all works fine, with MyODBC on remote WinXP and local on LINUX it works all fine without problems. Test using unixODBC and Orcale also succeeded.


For test purposes tests with Openlink ODBC Driver works without problems, and I use the odbctest programm from odbcsdk from www.iodbc.org, and I'm using the newest odbcsdk.

Normally I understand ODBC connectors like these:

Bind driver manager (odbc library) to programm
Use ODBC driver (e.g. unixODBC oder iODBC) and client on remote plattform.
Use ODBC Server on the MySQL-Plattform (like Openlink), in my exampe a LINUX machine, which gets connections from a client.
Client calls driver manager, which contacts driver, which is looking into odbc.ini, and establish a connection to the host system

Several Questions:

And how is it working in MySQL?
What is getting ODBC connections from the remote systems?
Which program/library is exactly responsible for connection on remote and on host side?
For what I need iodbc or unixODBC exactly in relation to MyODBC?


I tried several plattforms and ready distributions for AIX, HPUX and Solaris, all doesn't work!!! For demonstration I use Solaris as example.

Environment:

Sun Solaris 2.8 (SunOS hostd 5.8 Generic_108528-29 sun4u sparc SUNW,Ultra-5_10)
MyODBC-3.51.07-sun-solaris2.8-sparc

Linux hostb 2.6.7 #1 SMP Tue Jun 22 13:59:30 CEST 2004 i686 GNU/Linux
MySQL 4.0.21

odbc.ini on hostb - it works

[mysql]
Description = MySQL ODBC 3.51-07 Driver DSN
Host = hostb.actis.de
Port = 3306
ServerType = localhost
Database = myname
Password = mypw
Driver = /usr/local/lib/libmyodbc3.so
ReadOnly =
NoLoginBox =
FetchBufferSize =
OPTION = 3
SOCKET = /home/mysql/db/mysql.socket


odbc.ini on hostd - doesn't work

[mysql]
Description = MySQL ODBC 3.51-09 Driver DSN
Host = hostb.actis.de
Port = 3306
ServerType = MySQL
ServerName = hostb.actis.de
Database = myname
Protocol =
Driver = /home/ms/odbc/lib/libmyodbc3
ReadOnly =
NoLoginBox =
FetchBufferSize =
OPTION = 3
;SOCKET = /home/mysql/db/mysql.socket

I guess I don't need to use a socket, because it is a remote system?

I got this libs in this package MyODBC-3.51.07-sun-solaris2.8-sparc:

libmyodbc3 libmyodbc3.lai libmyodbc3_r.la
libmyodbc3-3.51.07 libmyodbc3_r libmyodbc3_r.lai
libmyodbc3.a libmyodbc3_r-3.51.07
libmyodbc3.la libmyodbc3_r.a

No libmyodbc3.so is present!


Using odbc.ini on hostd

Driver = /home/ms/odbc/lib/libmyodbc3

./odbctest "DSN=mysql;PWD=myname;UID=mypw"
OpenLink ODBC Demonstration program
SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded, SQLSTATE=IM003
SQLDriverConnect = [iODBC][Driver Manager]ld.so.1: ./odbctest: fatal: libmysqlclient.so.12: open failed: No such file or directory, SQLSTATE=00000

Ups, what is libmysqlclient.so.12 ?? All other libs doesn't work

So I'm generation complete new libs with these components

mysql-4.0.21 (sources)
MyODBC-3.51.09 (sources)
iodbc 3.52.1 (sources)

and I got a new lib

libmyodbc3.so

Using odbc.ini on hostd
Driver = /home/ms/odbc/lib/libmyodbc3

ms@actisd 575> ./odbctest "DSN=myname;PWD=ms;UID=mypw"
OpenLink ODBC Demonstration program
This program shows an interactive SQL processor
SQLDriverConnect = [MySQL][ODBC 3.51 Driver]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2), SQLSTATE=HY000

Local MySQL server??? No, I want to connect to hostb.

So can please anyone explain me what I'm making wrong?

Options: ReplyQuote


Subject
Written By
Posted
Urgent: Problems with connecting other plattforms to mysql with MyODBC
October 27, 2004 06:24AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.