0% found this document useful (0 votes)
217 views

Connect To Mysql Using C API With Dev C

The document provides steps to connect to a MySQL database using the C API with the Dev C++ IDE: download and install the MySQL development package for Dev C++, open Dev C++ and go to the compiler options to add "-lmysql" to the linker, and then you should be ready to code with MySQL running.

Uploaded by

satyamic
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
217 views

Connect To Mysql Using C API With Dev C

The document provides steps to connect to a MySQL database using the C API with the Dev C++ IDE: download and install the MySQL development package for Dev C++, open Dev C++ and go to the compiler options to add "-lmysql" to the linker, and then you should be ready to code with MySQL running.

Uploaded by

satyamic
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Connect to Mysql using C API with Dev C++ IDE

Well after some tinkering I managed to get it going. It was pretty simple actually, just figuring out how to get Dev C++ to work with it proved to be most challanging. Anyhow, here are the simple steps to get you up and running. These steps assume that you have Dev C++ installed, mysql installed and running and a working knowledge of the C programming language. On my system I have xamppwhich provides a web interface to mysql using the apache server, if you get this you can create your own database, connect to it and execute querries, but for this tutorial we'll just use the default mysql database that comes pre-installed.

Step 1
Download and install the mysql devpak for Dev C++

Step 2
Open Dev C++ and go to tools -> compiler options (depicted below)

In the compiler options dialog add the following command to the linker: -lmysql, as shown below

And that should be it for now, just ensure you have mysql running and you should be ready to code!

You might also like