Did you configure PHP the correct way. For mysql it is necessary to configure php like that
./configure --with-mysql=/path/to/mysql/directory
make
make install
There's no need to change anything in the php.ini
As always: If I am wrong, correct my message 🙂