Linux – find the include files for MySQL on Linux

lamplinuxMySQLUbuntu

Where can I find the include files for MySQL on Linux? I looked in /usr/include/mysql according to this but they are not there. My apache web server works fine with MySQL 5.1 up and running with PHP 5, but I can't find where the includes directory is!!

Thanks for your help!

Best Answer

$ mysql_config --include

On my system, this prints -I/usr/include/mysql

If the directory revealed by mysql_config doesn't have the right include files, your installation may have been partial or may have been altered after the fact.

From the documentation:

mysql_config provides you with useful information for compiling your MySQL client and connecting it to MySQL....

--include

Compiler options to find MySQL include files.