MySQL provides an operation interface in the C ++ language. You can use this interface to write a C ++ client to your database. For the installation method, see the official documentation.
This Article How to compile the MySQL connector C ++ application in Visual Studio 2008 Program This method is for the installation package of MySQL connector C ++. Another article introduces how to compile from the MySQL connector C ++ source code package.
The following describes how to install a binary package using MySQL connector C ++ in Visual Studio 2005:
1) install MySQL first
Remember to select developer components-c Include files/lib files. Of course, you can only install this separate package without installing MySQL, but I suggest installing a MySQL locally. Otherwise, how can we test it? Remote testing is too troublesome ~~
2) download the MySQL connector C ++ version corresponding to Visual Studio 2005.
3) create a Win32 console project in Visual Studio 2005
File-> new project-> visual c ++-> Win32-> Win32 console application
note: "additional options: precompiled header" in "application settings" will be selected by default, but this is basically not needed here.
4) correctly configure the project properties
whether it is debug or release, you can set it using the following method, mainly to include the relevant header files to the project, specify the path of the relevant dynamic link library.
(1) Open the "project"-> "properties" dialog box, select "configuration properties"
and add the installation directory of MySQL connector/C ++ to additional include directory:
Project-> properties configuration properties-> open Tree View C/C ++-> General [...]