Connector/ODBC Installation
1748
See
Section 20.1.3.1.2, “Installing the Windows Connector/ODBC Driver using the Zipped DLL
Package”
for the
copy
commands to complete the installation.
20.1.3.5. Building Connector/ODBC from a Source Distribution on Unix
Note
Connector/5.2 uses
cmake
for build, rather than
autoconf
and its
configure
command.
You need the following tools to build MySQL from source on Unix:
• A working ANSI C++ compiler. GCC 4.2.1 or later, Sun Studio 10 or later, Visual Studio 2008 or later,
and many current vendor-supplied compilers are known to work.
•
cmake
.
• MySQL client libraries and include files from MySQL 4.0.0 or higher. (Preferably MySQL 4.0.16 or
higher). This is required because Connector/ODBC uses calls and structures that exist only starting
from this version of the library. To get the client libraries and include files, visit
http://dev.mysql.com/
downloads/
.
If you have built your own MySQL server or client libraries from source using the GNU autotools,
use the
--enable-thread-safe-client
option to
configure
when the libraries were built. No
special option is needed if you configure with
cmake
.
Also, ensure that the
libmysqlclient
library was built and installed as a shared library.
• A compatible ODBC manager must be installed. Connector/ODBC is known to work with the
iODBC
and
unixODBC
managers. See
Section 20.1.2.1.2, “ODBC Driver Managers”
for more information.
• If you are using a character set that is not compiled into the MySQL client library, install the MySQL
character definitions from the
charsets
directory into
SHAREDIR
(by default,
/usr/local/
mysql/share/mysql/charsets
). These should be in place if you have installed the MySQL
server on the same machine. See
Section 10.1, “Character Set Support”
for more information on
character set support.
Once you have all the required files, unpack the source files to a separate directory, then run
configure
and build the library using
make
.
Typical
cmake
Options
iODBC
is the default ODBC library used by Connector/ODBC. Alternatively,
unixODBC
may be used by
passing in the appropriate option to
cmake
. For example:
shell>
cmake -G "Unix Makefiles" -DWITH_UNIXODBC=1
When you run
cmake
, you might add options to the command line. Here are some examples:
•
-DODBC_INCLUDES=dir_name
: Used when the ODBC include directory is not found within the
system
$PATH
.
•
-DODBC_LIB_DIR=dir_name
: Used when the ODBC library directory is not found within the system
$PATH
.
•
-DWITH_UNIXODBC=1
: Enables unixODBC support.
Additional configure Options
There are a number of other options that you need, or want, to set when configuring the Connector/
ODBC driver before it is built.
• To link the driver with MySQL thread safe client libraries
libmysqlclient_r.so
or
libmysqlclient_r.a
, specify the following
configure
option:
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 ...