MySQL Lib is old, it shouldn't be chosen over MySQLi in any circumstances really.
MySQL Lib = old & lacks new functionality
MySQLi = new & restricted to MySQL
PDO = new & works on almost any DB
So you should generally use PDO over anything for portability.
Though half of you probably don't even know PDO exists.
I never use the mysql or mysqli libraries in my code now, it'd be an illogical decision to do so when you can have complete portability with PDO. You can code your script to use PDO so if you ever switch DB, you only change the connection, not the queries.