1. install mysql first
Specific tutorials can refer to 52446608
Note When installing the product, remember to choose MySQL Connector C,
2. After installing mysql , start the configuration, click Project , Click Project Properties,
3. Select the address of the include file in the add-in directory of the MySQL installation address in thegeneral in the additional include Directories . C:\Program files\mysql\mysql Connector C 6.1\include,
4. Select the linker to add the address of the Lib file in your MySQL installation address in the additional library directory in the general, as I am C:\Program files\ Mysql\mysql Connector C 6.1\lib,
5. Click Input in the linker to add libmysql.libto the additional dependencies, note that libmysql.lib is not Libmysql.dll ,
6. then copy the libmysql.dll from the C:\Program files\mysql\mysql Connector C 6.1\lib to the project's in x64 ,
Note the path
7. change the operating platform to x64,
Problems that arise
If you just downloaded mysql sever, you will see an issue like the one that cannot locate the ordinal 3283 , the workaround is to install MySQL Connector C.
Run MySQL Install the product there and put the MySQL Connector C Hook it up, then follow the above process to get it over again.
VS2017 C + + operation MySQL Database