Connector/ODBC Installation
1750
shell>
CC=/usr/bin/gcc \
$CC -bundle -flat_namespace -undefined error \
-o .libs/libmyodbc3-3.51.01.so \
catalog.o connect.o cursor.o dll.o error.o execute.o \
handle.o info.o misc.o myodbc3.o options.o prepare.o \
results.o transact.o utility.o \
-L/usr/local/mysql/lib/mysql/ \
-L/usr/local/iodbc/lib/ \
-lz -lc -lmysqlclient -liodbcinst
Make sure to change
-liodbcinst
to
-lodbcinst
if you are using
unixODBC
instead of
iODBC
,
and configure the library paths accordingly.
This builds and places the
libmyodbc3-3.51.01.so
file in the
.libs
directory. Copy this file to
the Connector/ODBC library installation directory (
/usr/local/lib
, or the
lib
directory under the
installation directory that you supplied with the
--prefix
option).
shell>
cd .libs
shell>
cp libmyodbc3-3.51.01.so /usr/local/lib
shell>
cd /usr/local/lib
shell>
ln -s libmyodbc3-3.51.01.so libmyodbc3.so
To build the thread-safe driver library:
shell>
CC=/usr/bin/gcc \
$CC -bundle -flat_namespace -undefined error
-o .libs/libmyodbc3_r-3.51.01.so
catalog.o connect.o cursor.o dll.o error.o execute.o
handle.o info.o misc.o myodbc3.o options.o prepare.o
results.o transact.o utility.o
-L/usr/local/mysql/lib/mysql/
-L/usr/local/iodbc/lib/
-lz -lc -lmysqlclient_r -liodbcinst
Installing Driver Libraries
To install the driver libraries, execute the following command:
shell>
make install
That command installs one of the following sets of libraries:
For Connector/ODBC 3.51:
•
libmyodbc3.so
•
libmyodbc3-3.51.01.so
, where 3.51.01 is the version of the driver
•
libmyodbc3.a
For thread-safe Connector/ODBC 3.51:
•
libmyodbc3_r.so
•
libmyodbc3-3_r.51.01.so
•
libmyodbc3_r.a
For more information on build process, refer to the
INSTALL
file that comes with the source
distribution. Note that if you are trying to use the
make
from Sun, you may end up with errors. On the
other hand, GNU
gmake
should work fine on all platforms.
Testing Connector/ODBC on Unix
To run the basic samples provided in the distribution with the libraries that you built, use the following
command:
shell>
make test
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...