您的PHP MySQL库版本与您的MySQL服务器版本不同 [英] Your PHP MySQL library version differs from your MySQL server version

查看:220
本文介绍了您的PHP MySQL库版本与您的MySQL服务器版本不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将我的Debian 5.0.4服务器上的MySQL升级到了5.1。现在phpMyAdmin显示以下警告:



您的PHP MySQL库版本5.0.51a与您的MySQL服务器版本5.1.43不同



是否有可能导致任何问题?

解决方案

消息表示:




  • 您正在使用MySQL服务器的 5.1.43版

  • 但是PHP 使用的库与该服务器通信已编译为与MySQL的版本5.0.x 进行通信。



理论上,这不应该导致任何真正的问题:次要版本往往是兼容的;但是您可能需要更新PHP使用的库;也许像 libmysql 这样的软件包,或者这样的东西(我没有Debian机器)





如果你想让这个警告消失(即使我不确定它真的可以造成任何大问题),你会有更新用于与MySQL进行通信的PHP组件


注意:随着依赖,实际上可能不是那么简单,只需升级一个包...



我会说你'必须更新像 php5-mysql ;这意味着:

  apt-get install php5-mysql 

(根据此页面 - 除其他外 - 更新单个包,您必须使用安装



如果您使用 aptitude ,而不是apt-get ...不确定您应该使用更正的选项只有一包;仍然, aptitude safe-upgrade 应该向您显示一个将升级的软件包列表,这将允许您决定是否继续...





但是您在另一个回答中表示,Debian默认使用MySQL 5.0 - 这意味着PHP的官方模块可能已经被编译对于libmysql 5.0,而不是libmysql 5.1。



为了解决这个问题,你必须要么:




  • 根据libmysql 5.1查找提供PHP <或>(或至少是 mysql 扩展名)的存储库, li>
  • 重新编译 PHP和/或 mysql 扩展对您当前使用的libmysql版本系统 - 即libmysql 5.1


I've recently upgraded MySQL on my Debian 5.0.4 server to 5.1. Now phpMyAdmin shows the following warning:

Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.43

Is it likely to cause any problems?

解决方案

The message indicates that :

  • You are using version 5.1.43 of MySQL server
  • But that the library that's used by PHP to communicate with that server has been compiled to communicate with a version 5.0.x of MySQL.

In theory, this should not cause any real problem : minor versions tend to be compatible ; but you might need to update the library that's used by PHP ; maybe some package like "libmysql", or something like that (I don't have a Debian machine)


If you want to make that warning disappear (even if I'm not sure it could really cause any big problem), you'll have to update the PHP component that is used to communicate with MySQL.
Note : With the dependancies, it might not be that easy, actually, to upgrade just one package...

I would say that you'd have to update something like php5-mysql ; which means :

apt-get install php5-mysql

(According to this page -- amongst others -- to update a single package, your must use install)

If you are using aptitude, and not apt-get... Not sure about the right option that you should use to update only one package ; still, aptitude safe-upgrade should present you with a list of packages it will upgrade, which will allow you to decide whether or not you wish to continue...


But you said in a comment to another answer that Debian ships by default with MySQL 5.0 -- which means the "official" module for PHP is probably compiled against libmysql 5.0, and not libmysql 5.1.

To solve that problem, you'll have to either :

  • Find a repository that provides PHP (or, at least, the mysql extension) compiled against libmysql 5.1
  • Or re-compile PHP and/or the mysql extension against the version of libmysql that's currently used on your system -- i.e. libmysql 5.1

这篇关于您的PHP MySQL库版本与您的MySQL服务器版本不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆