Redhat might have an FAQ about this on their support section as well. I was able to get this working on RH 7.1 without compiling my own PHP or MySQL.
Check your /etc/php.ini file
and ensure the extension for mysql is uncommented. It should show this:
extension=mysql.so
Make sure you have the client driver file libmysqlclient.so.10 (the 10 part might vary
depending on your release/version of this) in /usr/lib/mysql. If it isn't there, you probably don't have the client library package installed.
RedHat does things very differently from the defaults in the distributions from PHP/MySQL having the source code. If you pick up an RPM for Redhat that is ready to go, that is fine, but the source to compile yourself is done with different paths for everything. It can be done, but you'd spend a full day tracing everything that has a path needing correction. It is far easier to get it working with the RedHat RPMs.