Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yum install php-mysql unable to install Centos

I am having difficulty installing php-mysql, I do the following:

yum -y install php-mysql

but get the following:

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.escapemg.com
 * extras: mirror.chpc.utah.edu
 * updates: mirrors.xmission.com
Setting up Install Process
No package php-mysql available.
Error: Nothing to do

I did a yum repolist disabled and enabled yum-config-manager --enable C6.1-base but still keep getting the same No package php-mysql available.

like image 568
Systems Party Avatar asked Sep 16 '14 15:09

Systems Party


2 Answers

I figured it out, it appeared that mysql in /etc/yum.conf there was a line exclude=mysql* php* once I commented it out, I was able to yum install mysqlnd. Thanks to everyone who

like image 129
Systems Party Avatar answered Sep 21 '22 19:09

Systems Party


The obvious problem is that you don't have a repository with PHP installed. It's odd that base doesn't have one but you can fix this by installing the remi repository, which has PHP 5.4 through 5.6 (just enable the version you want)

I would highly suggest installing php-mysqlnd instead of php-mysql, as that is the native driver and does not require any mysqlclientXX libraries, which are a mess to maintain.

like image 34
Machavity Avatar answered Sep 23 '22 19:09

Machavity