CentOS “Error: php-mysql conflicts with php-mysqlnd” updating with PHP 7.0

If you get an error about a conflict between php-mysql and php-mysqlnd when updating CentOS packages after installing and activating the PHP 7.0 remi package source like this one:

# yum -y install php-mysql

...

--> Finished Dependency Resolution
Error: Package: php-mysql-5.4.45-7.el6.remi.x86_64 (remi)
           Requires: php-pdo(x86-64) = 5.4.45-7.el6.remi
           Removing: php-pdo-5.3.3-46.el6_7.1.x86_64 (@updates)
               php-pdo(x86-64) = 5.3.3-46.el6_7.1
           Updated By: php-pdo-7.0.5-1.el6.remi.x86_64 (remi-php70)
               php-pdo(x86-64) = 7.0.5-1.el6.remi
           Available: php-pdo-5.3.3-40.el6_6.x86_64 (base)
               php-pdo(x86-64) = 5.3.3-40.el6_6
           Available: php-pdo-5.3.3-46.el6_6.x86_64 (updates)
               php-pdo(x86-64) = 5.3.3-46.el6_6
           Available: php-pdo-5.4.45-5.el6.remi.x86_64 (remi)
               php-pdo(x86-64) = 5.4.45-5.el6.remi
           Available: php-pdo-5.4.45-7.el6.remi.x86_64 (remi)
               php-pdo(x86-64) = 5.4.45-7.el6.remi
           Available: php-pdo-7.0.4-1.el6.remi.x86_64 (remi-php70)
               php-pdo(x86-64) = 7.0.4-1.el6.remi
Error: php-mysql conflicts with php-mysqlnd-7.0.5-1.el6.remi.x86_64
Error: Package: php-mysql-5.4.45-5.el6.remi.x86_64 (remi)
           Requires: php-pdo(x86-64) = 5.4.45-5.el6.remi
           Removing: php-pdo-5.3.3-46.el6_7.1.x86_64 (@updates)
               php-pdo(x86-64) = 5.3.3-46.el6_7.1
           Updated By: php-pdo-7.0.5-1.el6.remi.x86_64 (remi-php70)
               php-pdo(x86-64) = 7.0.5-1.el6.remi
           Available: php-pdo-5.3.3-40.el6_6.x86_64 (base)
               php-pdo(x86-64) = 5.3.3-40.el6_6
           Available: php-pdo-5.3.3-46.el6_6.x86_64 (updates)
               php-pdo(x86-64) = 5.3.3-46.el6_6
           Available: php-pdo-5.4.45-5.el6.remi.x86_64 (remi)
               php-pdo(x86-64) = 5.4.45-5.el6.remi
           Available: php-pdo-5.4.45-7.el6.remi.x86_64 (remi)
               php-pdo(x86-64) = 5.4.45-7.el6.remi
           Available: php-pdo-7.0.4-1.el6.remi.x86_64 (remi-php70)
               php-pdo(x86-64) = 7.0.4-1.el6.remi
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

You can just remove the PHP 5.x version of php-mysql:

# yum remove php-mysql

Update all the packages:

# yum -y update

And finally just install php-mysql again but this time it will be from PHP 7.0:

# yum -y install php-mysql

You might also like

MySQL can’t start after updating from 5.1 to 5.5
After updating a MySQL server from 5.1.73 to 5.5.4 it won't start. To see what was going on I checked...

“Uncaught exception ‘ErrorException’ with message ‘proc_open(): fork failed” with composer
I got this error while updating with composer:PHP Fatal error: Uncaught exception 'ErrorException'...

Split and join large files using cat, split and tar
I was going to store a CentOS DVD iso file into my external hard drive but the image was bigger than...

Change root password in MySQL
In GNU/Linux:$ sudo mysqld_safe --skip-grant-tables & $ mysql -u root -p #press enter to use a...

Leave a Comment