Centos

升級PHP-mysql Lib Centos 6

  • August 27, 2014

我只是刪除了所有 php 和 mysql 並重新安裝。但在 PHPMyadmin 我仍然得到:

Your PHP MySQL library version 5.1.69 differs from your MySQL server version 5.5.39. This may cause unpredictable behavior.

有我的完整規格列表:

[root@**** ~]# php -v
PHP 5.4.31 (cli) (built: Jul 25 2014 07:41:53) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
[root@***** ~]# rpm -qa | grep php
php54w-5.4.31-1.w6.x86_64
php54w-xml-5.4.31-1.w6.x86_64
php54w-mcrypt-5.4.31-1.w6.x86_64
php54w-mysql-5.4.31-1.w6.x86_64
php-tcpdf-dejavu-sans-fonts-6.0.089-1.el6.noarch
php54w-cli-5.4.31-1.w6.x86_64
php54w-mbstring-5.4.31-1.w6.x86_64
php-php-gettext-1.0.11-3.el6.noarch
php54w-pdo-5.4.31-1.w6.x86_64
php54w-tidy-5.4.31-1.w6.x86_64
php-tcpdf-6.0.089-1.el6.noarch
phpMyAdmin-4.0.10.1-1.el6.noarch
php54w-common-5.4.31-1.w6.x86_64
php54w-gd-5.4.31-1.w6.x86_64
php54w-bcmath-5.4.31-1.w6.x86_64

[root@**** ~]# rpm -qa --qf '%{name}-%{version}.%{release}.%{arch}\n' php\* mysql\* | sort
mysql55w-5.5.39.1.w6.x86_64
mysql55w-libs-5.5.39.1.w6.x86_64
mysql55w-server-5.5.39.1.w6.x86_64
php54w-5.4.31.1.w6.x86_64
php54w-bcmath-5.4.31.1.w6.x86_64
php54w-cli-5.4.31.1.w6.x86_64
php54w-common-5.4.31.1.w6.x86_64
php54w-gd-5.4.31.1.w6.x86_64
php54w-mbstring-5.4.31.1.w6.x86_64
php54w-mcrypt-5.4.31.1.w6.x86_64
php54w-mysql-5.4.31.1.w6.x86_64
php54w-pdo-5.4.31.1.w6.x86_64
php54w-tidy-5.4.31.1.w6.x86_64
php54w-xml-5.4.31.1.w6.x86_64
phpMyAdmin-4.0.10.1.1.el6.noarch
php-php-gettext-1.0.11.3.el6.noarch
php-tcpdf-6.0.089.1.el6.noarch
php-tcpdf-dejavu-sans-fonts-6.0.089.1.el6.noarch

誰能告訴我我能做些什麼來升級我的 php-mysql 庫?

更換時注意

   [root@**** ~]# yum replace php-common --replace-with=php54w-common
Loaded plugins: fastestmirror, replace
Loading mirror speeds from cached hostfile
* base: mirrors.dk.telia.net
* epel: mirror.proserve.nl
* extras: ftp-stud.fht-esslingen.de
* rpmforge: mirror.nl.leaseweb.net
* updates: mirror.informatik.hs-fulda.de
* webtatic: us-east.repo.webtatic.com
Replacing packages takes time, please be patient...
Error: Package 'php-common' is not installed.

如果您為非標準 CentOS 軟體包使用額外的儲存庫,並且想要使用某些組件的更新版本,您也可以從閱讀他們的公告中受益:

2013-07-21 更新– 添加了一個新包“php54w-mysqlnd”作為“php54w-mysql”的替代品。這將提供基於 PHP MySql 本機驅動程序而不是系統預設 libmysqlclient 建構的 mysql、mysqli 和 pdo_mysql。它將替換“php54w-mysql55”,因為它將與 MySQL 5.0/5.1/5.5 伺服器一起使用)

引用自:https://serverfault.com/questions/624377