MySQL Forums
Forum List  »  Install & Repo

Missing header files
Posted by: Mike West
Date: December 05, 2007 12:57AM


I am using Xubuntu 7.10 on my server. I am remotely administering it from my Ubuntu 7.10 machine over my lan. I installed PHP5 using apt-get install.

When I went to check to see if php and mysql were working together, PHP said undefined reference to mysql_connect so I googled it and then tried msql_connect. Same error message.

So then I found some articles saying that PHP5 is no longer bundled with MySQL support enabled by default. I found this site:
where it says to use the --with-mysql=/usr option when building PHP5. Problem was, apt-get automatically installed it for me. So I apt-get removed php, and then downloaded the tarball from

Then I ./configure --with-mysql=/usr but I get this:

configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!

So then I try to locate the MySQL header files myself, and am surprised to find that I CAN'T find them! I tried locate, slocate, whereis, I tried /usr, /usr/include, /usr/local, etc., and can't find them anywhere.

So I try apt-get install mysql, hit tab twice to see available packages beginning with mysql, and don't know what to do now. I searched the forum and didn't find any article relating to missing header files. I found a couple mysql header files in my php directory where I extracted the tarball to, but do I use these or does MySQL have its own header files?

I'm lost here. I'd appreciate it if anyone could help me here. Thanks in advance.

Options: ReplyQuote

Written By
Missing header files
December 05, 2007 12:57AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.