File: INSTALL-BINARY

package info (click to toggle)
myodbc 3.51.09-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,400 kB
  • ctags: 1,596
  • sloc: ansic: 29,806; sh: 10,765; cpp: 627; makefile: 610
file content (165 lines) | stat: -rw-r--r-- 5,253 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
	  ***************************************
	  *       MySQL ODBC 3.51 Driver        *
 	  *           INSTALL-BINARY            *
          * (C) Copyright MySQL AB 1995-2004    *
	  ***************************************

==============================================
CONTENTS
==============================================
1. INSTALLATION FILES
2. INSTALL THE DRIVER
3. CONFIGURING DATA SOURCE
4. TESTING THE DRIVER
5. TESTING WITH iodbc
6. TESTING WITH unixODBC

=============================================
1. INSTALLATION FILES
=============================================

If you are installing from a binary distribution, then make
sure you have the following files after unzipping the 
'MyODBC-$VERSION-$SYSTEM.$MACHINE.tar.gz':

DOCS:

  - INSTALL-BINARY ( This file )
  - README         ( About MyODBC and MySQL )
  - COPYING        ( for the copyright information )
  - ChangeLog      ( List of changes )
  - RELEASE-NOTES  ( Release notes for a perticular version)
  - odbc.ini       ( Sample odbc.ini configure file )

DRIVER BINARIES:

  - libmyodbc3-$VERSION.so   ( Shared version of driver )
  - libmyodbc3.so            ( Link to the above one)
  - libmyodbc3.la*           ( Static version of driver )
  - libmyodbc3_r-$VERSION.so ( Shared version of the threded driver )
  - libmyodbc3_r.so          ( Link to the above one)

  In case if you don't have a shared version of the library, then 
  its probably due to the factor that the environment is not 
  suitable to build the shared libraries.  


====================================
2. INSTALL THE DRIVER
====================================

Now, install the driver by copying the libmyodbc3* files to 
either '/usr/lib' or '/usr/local/lib' or any other desired path.

Make sure the link to 'libmyodbc3.so' points to right file. 
While copying if you get the duplicated library, them remove 
that and re-create the link as 

 cd /usr/local
 ln -s libmyodbc3-$version.so libmyodbc3.so

Now modify the odbc.ini, so that the DRIVER option from 
myodbc3 DSN points to the correct file i.e. libmyodbc3.so.
Copy this file to /usr/local/etc and set the following 
environment veriables:

 export ODBCINI=/usr/local/etc/odbc.ini
 export ODBCSYSINI=/usr/local/etc (for unixODBC)

If you already have odbc.ini file then modify that. 

=================================
3. CONFIGURATING DATA SOURCE NAME
=================================

Follow the configuration options from odbc.ini. For more 
information about the detailed configuration check the 
MyODBC FAQ at:
http://www.mysql.com/products/myodbc

=====================
4. TESTING WITH iodbc
=====================

Go to the samples directory for libiodbc run 'odbctest'.If you enter '?' in 
the prompt you should see the databases you have configured in .odbc.ini.

Here is a sample run that checks if your odbc setup works.

(This assumes you have a DSN named 'myodbc3' in your odbc.ini file):

(/my/local/src/libiodbc-2.50.3/samples) odbctest
OpenLink ODBC Demonstration program
This program shows an interactive SQL processor

Enter ODBC connect string (? shows list): ?

DSN                            | Description
---------------------------------------------------------------
myodbc                         | MySQL ODBC 2.50 Driver DSN
myodbc3                        | MySQL ODBC 3.51 Driver DSN

Enter ODBC connect string (? shows list): DSN=myodbc3

SQL>select version();
version()
------------------
3.23.14-alpha
 1 row(s) fetched.

SQL>quit

Have a nice day.


If you can't get the above to work (you get the SQLSTATE=IM008 error),
verify that your loader can find the libmysqlclient.so library:

(/my/local/src/myodbc-3.51.01) ldd /usr/local/lib/libmyodbc3.so
        libmysqlclient.so.7 => not found
        libc.so.6 => /lib/libc.so.6 (0x40018000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

The above means that libmysqlclient.so can't be found.

You can fix this in some of the following ways:

- Add the path the the libmysqlclient library to /etc/ld.so.conf and run
  ldconfig
- copy or link libmysqlclient.a to some library that is searched by ldconfig
  and run ldconfig.
- Add the path to the LD_LIBRARY_PATH variable.

In the following example, I used the last method:
(/my/local/src/libiodbc-2.50.3/samples) export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib/mysql
(/my/local/src/libiodbc-2.50.3/samples) ldd /usr/local/lib/libmyodbc3.so
        libmysqlclient.so.7 => /usr/local/mysql/lib/mysql/libmysqlclient.so.7 (0x40014000)
        libc.so.6 => /lib/libc.so.6 (0x4002c000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x400d3000)
        libm.so.6 => /lib/libm.so.6 (0x400d9000)
        libz.so.1 => /usr/lib/libz.so.1 (0x400f2000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40100000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

========================
5. TESTING WITH unixODBC
========================

Locate the command line utility 'isql' distributed with unixodbc
and then try "isql -v test" where test is the DSN for MyODBC 3.51
  

For more information, read the FAQs on MyODBC from 
http://www.mysql.com/products/myodbc/faq_toc.html


Have fun.

On behalf of the MySQL AB team:

Michael Widenius & Venu Anuganti
myodbc@lists.mysql.com