Install MySQL Connector/C++ and configure it into VS
1. Download MySQL Connector/C++ and install it
Download the corresponding package at the download address: https://dev.mysql.com/downloads/connector/c/ and install it.
2. Add the include directory you just installed
In vs2015, go to Project - Properties - C/C++
Find the additional include directory, click, then select NewLine (yellow button ), click the " ..." button to select the path of MySQL Connector, for example, mine is C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\include
3. Add additional library directories
Go to Project - Properties - Linker - Input
Find additional dependencies, then click, then click Edit, copy the path of MySQL Connector to it, for example, mine is C:\Program Files\MySQL\MySQL Connector C++ 1.0.5\lib\opt
Click OK to complete the configuration.