20.4.4. Installing MySQL Connector/C from a Binary Distribution
On Unix and Unix-like systems, a MySQL Connector/C binary distribution is packaged as a
compressed
in the intended installation directory using this command:
shell>
tar zxvf PACKAGE.tar.gz
Windows users can choose between two binary packaging formats:
• Windows MSI Installer
screens it presents to install MySQL Connector/C in the location of your choosing.
• Zip archive without installer
directory using
and
.tar.gz
mysql-connector-c-6.0.2-linux-rhel5-x86-64bit. If you want a simpler name to work with,
rename the directory. On Unix, an alternative is to create a symbolic link with a simpler name:
shell>
ln -s mysql-connector-c-6.0.2-linux-rhel5-x86-64bit connector-c
20.4.5. Installing MySQL Connector/C from Source
A MySQL Connector/C source distribution is packaged as a compressed
denoted here as
supported platform listed in
Download the distribution file and unpack it in the intended installation directory. To unpack a
compressed
shell>
tar zxvf PACKAGE.tar.gz
To unpack a Zip archive, use
After unpacking the distribution, build it using the following instructions appropriate for your platform.
20.4.5.1. Building MySQL Connector/C from Source on Unix
If the native compiler toolset for the target platform is available (for example, SunStudio for Solaris),
you can use that for compilation. Alternatively, the GNU toolset can be used on all platforms.
You also need
To build and install the source distribution, use the following procedure:
1. Change location to the top-level directory of the source distribution.
2. Generate the Makefile:
shell>
cmake -G "Unix Makefiles"
Or, for a Debug build:
shell>
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
By default, the installation location for MySQL Connector/C is /usr/local/mysql. To change this
location, use the
the Makefile. For example:
shell>
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/opt/local/mysql
For other
Installing MySQL Connector/C from a Binary Distribution
file, denoted here as PACKAGE.tar.gz. Download the distribution file and unpack it
tar
(.msi
file): To use the MSI Installer, launch it and follow the prompts in the
(.zip
or another tool that can read
WinZip
packages unpack into a directory named PACKAGE, which is a value such as
.zip
PACKAGE.tar.gz
Section 20.4.1, "MySQL Connector/C Supported
file, use this command:
tar
WinZip
2.6 or newer, which is available from cmake.org.
CMake
CMAKE_INSTALL_PREFIX
options that you might find useful, see
CMake
file): To use a Zip archive, unpack it in the intended installation
.zip
or PACKAGE.zip. A source distribution can be used on any
or another tool that can read
option to specify a different directory when generating
Section 20.4.5.3, "Other Build
2127
files.
file or Zip archive,
tar
Platforms".
files.
.zip
Options".
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers