MySQL + Apache + PHP is one of these combinations that noobs like me find to be a nightmare! But I spent most of last night doing it and got it working. I'd advice you do it like this:
1) Install MySQL first. Get it working - log in to the MySQL client ("mysql" at the command prompt), create a database etc.
2) Next install apache. Again, make sure it works - visit http://127.0.0.1
3) Finally install PHP. This is the tricky bit. Make sure you use the --with-mysql command option with your compile string. I used:
./configure --with-mysql=/usr/local --with-apxs2=/usr/local/bin/apache/bin/apxs
I think. Try playing around with the path you give in --with-mysql. It might be "/usr/" or it might be /usr/local/mysql. Also - don't copy my "with-apxs2" path - you should know from when you compiled Apache where you installed it to. Finally apxs2 is for Apache2. If you're using Apache1 then use "with-apxs" instead.
If you get errors on compile after all of that then I'm fairly stumped. My only other suggestions: make sure MySQL is running when you install Apache, and I did read something about the mysql.sock file needing to be in the /tmp/ directory but it not being there. If you look in /tmp/ and can't find mysql.sock then try finding it ("find / -name mysql.sock") and creating a symlink to it.
Anyway - once you've compiled PHP its pretty simple from there - just follow the instructions on the www.php.net
site and they'll tell you what you need to edit in your httpd.conf file.
Hope that helps a little!