As perl people use to say, there is more than one way do do it.
1st: install mysql (source or package).
Be sure it works.
2nd: install apache:
by package (rpm -i or apt-get)
by source: be sure to have some module enabled (at least one, or you wont be able to use php in dso)
3nd: install php
As you have installed apache with dso support, use the --with-apxs=/path/to/your/apache/bin/apxs
4: Be sure that httdp.conf has Those 2 lines:
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
AddType application/x-httpd-php .php
5: load a php page containing phpinfo();
check that mysql is enabled.
Good luck