	  ***************************************
	  *       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




