http://us3.php.net/mysql said:Installation
For compiling, simply use the --with-mysql[=DIR] configuration option where the optional [DIR] points to the MySQL installation directory.
This MySQL extension doesn't support full functionality of MySQL versions greater than 4.1.0. For that, use MySQLi.
If you would like to install the mysql extension along with the mysqli extension you have to use the same client library to avoid any conflicts.