0

I have a working MySQL 5.6 server on a CentOS 6.4
I'm trying tp get PHP working as well, and to create a connection to the MySQL.
As I understand I need the following components : php and php-mysql

yum install php

runs without problems.

yum install php-mysql

gives the following errors:

Transaction Check Error:
  file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/cp1256.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/cp1257.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/cp850.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/cp852.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/cp866.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/dec8.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/geostd8.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/greek.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/hebrew.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/hp8.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/keybcs2.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/koi8r.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/koi8u.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/latin1.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/latin2.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/latin5.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/latin7.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/macce.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/macroman.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/charsets/swe7.xml from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64
  file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.el6.x86_64

Error Summary
-------------

from what I've checked there is no possibility to let yum go on with the install without resolving the conflicts. So I've tried with rpm's php-mysql-5.3.3-22.el6.x86_64.rpm and also the dependencies:
php-pdo-5.3.3-22.el6.x86_64.rpm
php-common-5.3.3-22.el6.x86_64.rpm

the php-pdo and php-common install but the php-mysql gives this error :

error: Failed dependencies:
    libmysqlclient.so.16()(64bit) is needed by php-mysql-5.3.3-22.el6.x86_64
    libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by php-mysql-5.3.3-22.el6.x86_64
    php-common(x86-64) = 5.3.3-22.el6 is needed by php-mysql-5.3.3-22.el6.x86_64
    php-pdo(x86-64) is needed by php-mysql-5.3.3-22.el6.x86_64

This is the output of find / -name libmysqlclient

/usr/lib64/libmysqlclient_r.so.18.1.0
/usr/lib64/mysql/libmysqlclient.a
/usr/lib64/mysql/libmysqlclient_r.a
/usr/lib64/libmysqlclient.so.18.1.0
/usr/lib64/libmysqlclient_r.so
/usr/lib64/libmysqlclient.so
/usr/lib64/libmysqlclient.so.18
/usr/lib64/libmysqlclient_r.so.18

I read that libmysqlclient.so.16 is part of the following rpm :

MySQL-shared-compat-5.1.47-1.rhel5.x86_64.rpm
but it won't install becuase of conflicts with the newer shared-compat that I've installed as part of the MySQL installation.

3 Answers 3

1

MySQL-server-5.6.13-1.el6.x86_64 is provided by MySQL and will conflict with the packages maintained by CentOS.

In order to resolve this, your best bet is to (safely) revert to the mysql-server package provided by CentOS and install the PHP modules once you're back up and running.

Otherwise, you're probably looking at having to compile PHP from source to satisfy all the requirements of the php-mysql package.

2
  • YOu could also setup the mysql server in a VM/LXC/Chroot giving you a separate install for each.
    – Zoredache
    Aug 21, 2013 at 20:27
  • can't I just put the needed libmysqlclient.so.16 files in the /usr/lib64 folder ? I've noticed that the postfix server is not working too... it's also complaining about missing libmysqlclient.so.16. isn't libmysqlclient.so.18 should have all the functionality of libmysqlclient.so.16 , maybe I can create a symbolic link ?
    – Stasv
    Aug 21, 2013 at 20:33
0

Sounds to me like this bug: #63085. The newer version of MySQL from Oracle will have resolved this issue:

Fixed in 5.5.27.

And the page says

[27 Mar 11:32] Bryan Hollis

Yes,

This is an easy fix. Fortunately it is CentOS or el6 vs. Fedora.

Step 1: In ssh terminal as root # yum remove mysql-libs

  • You are getting rid of the older Sql libraries that are not compatible.

Step 2: # yum clean dbcache (Clean things up) Step 3: Install new Mysql Server and dependencies from a clean slate.

You will lose many dependencies when you remove the older packages, but you can then update other items like phpMyAdmin...all depends on the distro. This worked for me after I had a full install of CentOS 6.4 with same Sql and CPanels and the change went without a hitch. Best of luck - B.P.H

You probably want to do this in the test environment first to verify that you don't accidentally remove some extra dependency, or other valuable data etc.

6
  • the thing is that I did Step 1, in order to be able to install the new mySQL 5.6, everything worked perfectly. but now I'm having problems with the postfix server for example, which won't start due to missing libmysqlcliwnt.so.16 I've tried : yum update postfix. but it says no update is required
    – Stasv
    Aug 21, 2013 at 21:04
  • with the correct repo config, did you try yum provides "*/libmysqlclient.so.16". Check if mentioned package is installed.
    – Petter H
    Aug 22, 2013 at 6:29
  • After running the yum provides I got that it has the libmysqlclient.so.16 under different packages of mysql-lib. can I install only the libmysqlclient.so.16 ? when I try : yum install libmysqlclient.so.16 it tries to yum install a mysql-lib package, but of the wrong platform. that it hits the same conflicts I had in the beginning.
    – Stasv
    Aug 22, 2013 at 14:03
  • pick the version which is the same one as is your other mysql packages provided by oracle, and you should be fine. or grab a new set of MySQL packages from oracle and install them and you should be fine. If you use versions bundled with CentOS, you'll get stuck using old version
    – Petter H
    Aug 22, 2013 at 17:41
  • Good distributions of MySQL packages include several versions of the MySQL client libraries; I know under IUS, for example, I can simply do yum install mysqlclient16. Is there a compelling reason that you must use the Oracle-provided packages? They're widely considered inferior, and not just because of their boneheaded insistence on capitalization.
    – BMDan
    Aug 26, 2013 at 13:55
-1

try:

yum --enablerepo=remi install php-mysqlnd.x86_64

I installed this on CentOS 6.3 and it worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .