Problem. When installing a PHP 5.4 package and a MySQL 5.5 package, both from Dotdeb for Debian 6.0 "Squeeze", this results in PHP interfacing with MySQL via a SQL client library version 5.1.66 (or another one from the MySQL 5.1 series). That in turn causes phpMyAdmin to complain about it after logging in there: "Your PHP MySQL library version 5.1.66 differs from your MySQL server version 5.5.29. This may cause unpredictable behavior." Is this a problem, and how to fix it?
Analysis and solutions. This is not a real problem, just a cosmetic one. The client library version is lower and will be compatible for calling a higher server version. Only the other way round it would break things. At least this is the idea why the author has packaged it with this dependency [source].
Specifically, package php5-mysql depends on libmysqlclient16 (>= 5.1.21-1), which depdens on mysql-common (>= 5.1.66-0+squeeze1). Which in total means that the mysqli.so library for PHP5, provided by Dotdeb, claims to be ok working with a MySQL 5.5 server.
This has been found out from the output of:
dpkg -s php5-mysql,
dpkg -s libmysqlclient16. For an overview of all your installed MySQL-related packages and their versions, use
dpkg -l "*mysql*". Finally, to find out the MySQL client library version from within PHP, see here.
So it is only PHP software (phpMyAdmin) which complains about this. The only clean way to remove this warning would be to install the MySQL 5.1 server instead. But as every downgrade, it's not too easy (you have to backup your databases and may need to re-import them from SQL files [source]). And as said, it's seemingly just a cosmetic problem, all software so far runs fine.
The other option to fix this would be to use php5-mysqlnd instead of php5-mysql. However, that's seemingly not possible when using phpMyAdmin from Debian Squeeze packages (like we do), which depends on php5-mysql only and seemingly forgot to include an alternative dependency to php5-mysqlnd [source].