mysqli_real_connect(): Headers and client library minor version mismatch. Headers:50541 Library:50627
The error message means that there is a version conflict on your system. You installed the package containing "libmysql" and the package "php5-mysql" which links against that library, while using a different version. This indicates that there either is a bug in packaging from Ubuntu (unlikely) or you messed up with different package sources. To be precise: PHP thinks it would use libmysql 5.5, whereas 5.6 is installed.
Anyways, to the other part of the question: php5-mysqlnd and php5-mysql both contain the different MySQL userspace API libraries (mysql, mysqli and pdo_mysql) one package is the "traditional" one where those modules use libmysql, the other is the "modern" one where those modules use myslqnd. Documentation explaining the difference is on http://php.net/manual/en/mysqlinfo.library.choosing.php short form is: Use mysqlnd unless you have very specific requirements (i.e. using libmysld, with d in the end .. if you don't know what this is you don't want to use it; don't let it confuse you, use mysqlnd)
Now if there is no mysqli
after installing php5-mysqlnd
this might be caused by Ubuntu installing it, but not enabling the module, for this Ubuntu has a tool php5enmod
try this:
php5enmod mysqli