In order to use MySQL Connector/C, you need to perform the following operations:
Open your web browser and navigate to http://dev.mysql.com/downloads/connector/c/.
Download the
mysql-connector-c-6.1.3-win32.msi
ormysql-connector-c-6.1.3-winx64.msi
file, depending on your architecture and project configuration, and then start the installation as shown in the following screenshot:Accept the terms in the license agreement and select the Complete type of installation. Click on Finish and open Visual Studio, and then open the MultithreadedDBTest solution.
Open Solution explorer and right-click on the MultithreadedDBTest project. Select Properties. Under Configuration Properties, expand the General node. Open the combobox next to Additional Include Directories, and using the Windows folder browser, navigate to
C:\Program Files\MySQL\MySQL Connector C 6.1\include
, as shown in the following screenshot:Under Configuration Properties, expand the Linker node. Open the combobox next to Additional Dependences and enter
C:\Program Files\MySQL\MySQL Connector C 6.1\lib\libmysql.lib
, as shown in the following screenshot:Using the Windows file explorer, navigate to
C:\Program Files\MySQL\MySQL Connector C 6.1\lib
. Copy thelibmysql.dll
file toC:\Windows\System32
.
Now, you can compile and run the MultithreadedDBTest project or any other project that uses MySQL Connector/C.