mysqlnd vs libmysql

TL:DR If you are using php 5.3.3 or newer then go mysqlnd, otherwise stay with the default libmysql.

Whats the difference? While I could post it here for you, a more updated source would be http://www.php.net/manual/en/mysqlinfo.library.choosing.php.

As you can see, currently mysqlnd does ‘pretty-much’ evrything libmysql does with a plethora of additional features. So why on earth is that even a valid question? Well.. its not… at least not currently… If we move a few years in the past, mysqlnd did not support compression or SSL, which was in many cases a deal breaker. As of PHP 5.3.3 all of these are supported and it just makes more sense to go with the native driver.

Personally I use mysqlnd because I love using fetch_all. So, how to install? Follow below:

apt-get remove php5-mysql
apt-get insall php5-mysqlnd

(Note. you may have to reinstall anything that depended on mysql, such as phpmyadmin)