In centos or fedora, If you are facing above error.
Solution :
yum remove php56w-mysql yum install php56w-mysqlnd
I used php56 in command as I installed php with php56 package because I wanted php 5.6 on my server. If you have installed php using simple php or php5 command, remove php-mysql or php5-mysql package and install php-mysqlnd or php5-mysqlnd.
Restart apache and verify the issue. It should be fixed.