Mysql-mysql Interface Design MYSQL-CONNECTOR-C source installation

Source: Internet
Author: User

The MySQL website offers a variety of mysqlclient, which provide developers with the development of MySQL interfaces, where the Linux version provides different packages based on branch and branch versions.

Since I am the latest version of Ubuntu 16.04, I have not found the corresponding development package, and consider the following version upgrade and porting issues, or the way to use the source package is the most reliable.

But the source package does not provide installation instructions, find a half-day on the official website to find the installation tutorial.

4.2.1 Installing connector/c from Source on Unix and Unix-like Systems

If the native compiler toolset for the target platform are available (for example, Sunstudio for Solaris) For compilation. Alternatively, the GNU toolset can be used on all platforms.

You also need CMake 2.6 or newer, which are available from cmake.org.

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 :

    cmake -G "Unix Makefiles"

    Or, for a Debug build:

    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug

    By default, the installation location for CONNECTOR/C is /usr/local/mysql . To the CMAKE_INSTALL_PREFIX specify a different directory when generating the Makefile . For example:

    cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/opt/local/mysql

    For the other CMake options, the might find useful, see the other connector/c Build options.

  3. Build the project:

    make

  4. As root , install the connector/c headers, libraries, and utilities:

    Root-shell>make install

执行完一系列cmake后将产生makefile文件

注意将第二步中的install目录设置到自己的文件路径下

Mysql-mysql Interface Design MYSQL-CONNECTOR-C source installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.