不同 MySQL 版本导致的不可预测的行为

发布于 2024-08-01 13:09:15 字数 338 浏览 1 评论 0原文

我在wampserver上安装了不同版本的PHP和MySQL用于测试目的。 然而,phpMyAdmin 给出了警告: “您的 PHP MySQL 库版本 5.0.51a 与 MySQL 服务器版本 5.1.36 不同。这可能会导致不可预测的行为。”

这会引起问题吗? 如果是,应该怎么办?

我无法为我的 root 帐户设置密码。 通常,在更改 root 帐户密码时,phpMyAdmin 会给出错误。 此后,在 config.inc.php 文件中设置密码即可完成此工作。 但是,我的问题是我根本没有收到该错误屏幕。 即使我更改密码,它仍然给出相同的警告,提示没有为 root 帐户设置密码。

I have installed different versions of PHP and MySQL on wampserver for testing purposes. However, phpMyAdmin gives a warning that:
"Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.36. This may cause unpredictable behavior."

Is this going to cause problems?? If yes, what should be done?

I am not able to set up a password for my root account. Normally, on changing the root account password, phpMyAdmin gives an error. Thereafter, setting the password in the config.inc.php file does the job. But, the problem with me is that I am not at all getting that error screen. Even when I change the password, it still gives the same warning that no password is set up for the root account.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

赴月观长安 2024-08-08 13:09:15

如果您仅使用这台机器进行开发(似乎您这样做:“用于测试目的”),我认为这应该不是什么大问题。

我已经见过几次这样的消息,但从未尝试过任何可能相关的问题。

(如果是 4.0 和 4.1,也许是这样,因为添加了很多重要的新内容......但在 5.0 和 5.1 之间,我不这么认为)

纠正这一点“问题”,你必须安装 PHP 使用的库的新版本...而且我不确定 PHP 5.2 (5.2.10) 的最新版本是否使用 libmysql 5.1...

而且你可能不想自己重新编译任何东西 ^^

其他解决方案是降级到 MySQL 5.0.x ; 但我不会关心测试机器,除非我遇到奇怪的行为。

If you are using this machine for development only (seems you do : "for testing purposes"), I don't think it should be much of a problem.

I've seen that kind of message a few times, and never experimented any trouble that might be related.

(If it had been 4.0 and 4.1, maybe, as there were lots of important new stuff added... But between 5.0 and 5.1, I don't think so)

To correct that "problem", you'd have to install a new version of the libraries used by PHP... And I'm not sure the most recent version of PHP 5.2 (5.2.10) uses libmysql 5.1...

And you probably don't want to recompile anything by yourself ^^

Other solution would be to downgrade to MySQL 5.0.x ; but I wouldn't care, for a testing machine, unless I run into strage behaviour.

燃情 2024-08-08 13:09:15

我使用以下配置遇到了这个问题:

  • Windows 2008 32位
  • PHP 5.2.14
  • MySQL 5.1.49
  • phpMyAdmin 3.3.5

以下是我为摆脱“您的 PHP MySQL 库版本 5.0.51a 与您的 MySQL 服务器不同”所做的操作版本 5.1.36。这可能会导致不可预测的行为。” 消息:

  1. 我停止了 IIS
  2. 我删除了“C:\Program Files\PHP\libmysql.dll”文件
  3. 我将“C:\Program Files\MySQL\MySQL Server 5.1\bin\libmySQL.dll”文件复制到“C:\Program Files \PHP\" 目录
  4. 我启动了 IIS

它有点工作,但是 php-cgi 开始崩溃......

I experienced this problem using the following configuration:

  • Windows 2008 32-bit
  • PHP 5.2.14
  • MySQL 5.1.49
  • phpMyAdmin 3.3.5

Here is what I did to get rid of the "Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.36. This may cause unpredictable behavior." message:

  1. I stopped IIS
  2. I deleted "C:\Program Files\PHP\libmysql.dll" file
  3. I copied "C:\Program Files\MySQL\MySQL Server 5.1\bin\libmySQL.dll" file into "C:\Program Files\PHP\" directory
  4. I started IIS

It somewhat worked, but php-cgi began crashing...

苹果你个爱泡泡 2024-08-08 13:09:15

第一:无需太担心 - 也许您的客户端库不支持 mysql 5.1.x 的某些新功能,但您的数据应该是安全的。

您也可以忽略该消息,但有几种方法可以解决此问题:

  1. phpMyAdmin 显示此警告,因为这是 mysql 扩展开发人员推荐的内容(具有与服务器匹配的库),但您可能不会遇到任何问题。 顺便说一下,这个消息可以被禁用。
    然而,升级 MySQL 库客户端是必经之路。 执行此操作的方法取决于您如何在服务器上安装 MySQL 以及如何安装 PHP。 Lem9 说:但不知道嘿,请参阅 这里

  2. win用户可以将libmysql.dll从...\mysql\bin\复制到windir\system32(或搜索路径中的第一个文件夹)。 还要在所有磁盘上搜索旧版本的 libmysql 并重命名它们。

  3. 或尝试以下操作:
    转到%windir%\system32\
    重命名 libmysql.dll libmysql.bak (如果存在)
    复制 path2\mysql\bin\libmysql.dll %windir%\system32\

  4. 或删除已安装的内容并安装具有正确 MySQL 库的当前 XAMPP 套件 (xampp.org)。

  5. 要消除该消息,您必须确保您的操作系统找到最新的 libmysql(来自 mysql/bin/)作为搜索路径中的第一个。

看:
https:// sourceforge.net/search/?words=unpredictable+behavior。&offset=25&group_id=23067&type_of_search=forums&group_forum_id=72909

first: no need to worry too much - maybe your client library doesn't support some new features from mysql 5.1.x but your data should be safe.

you can also just ignore the msg, but there are several ways to fix this:

  1. phpMyAdmin displays this warning because this is what the mysql extension developers recommend (having a library that matches the server) but you might not have any problems. This message can be disabled, by the way.
    However, upgrading the MySQL library client is the sure way to go. The way to do it depends on how you installed MySQL on your server and how you installed PHP. Lem9 sais: but don't know hoi, see here

  2. win users can copy libmysql.dll from ...\mysql\bin\ to windir\system32 (or the 1st folder in the search-path). Also search all disks for older versions of libmysql and rename them.

  3. or try the following:
    goto %windir%\system32\
    rename libmysql.dll libmysql.bak (if exists)
    copy path2\mysql\bin\libmysql.dll %windir%\system32\

  4. or remove what you have installed and install instead the current XAMPP kit (xampp.org) which has the correct MySQL libraries.

  5. to get rid of that message you have to make sure that your OS finds the latest libmysql (from mysql/bin/) as the first one in your search path.

see:
https://sourceforge.net/search/?words=unpredictable+behavior.&offset=25&group_id=23067&type_of_search=forums&group_forum_id=72909

失而复得 2024-08-08 13:09:15

不,它不应该引起问题。 我对 phpMyAdmin 这个系统不太尊重。 我从未遇到过在 MySQL 中使用不同客户端/服务器版本的问题,并且我们已经在生产中大规模使用它们。

我一个字都不相信。 如果 phpmyadmin 这么说,并不一定意味着它是真的。

MySQL 客户端/服务器版本在很大程度上兼容,除非您正在查看其中任何一个的非常旧的版本(即 < 5.0)

No, it should not cause a problem. I have very little respect for phpMyAdmin as a system. I have never experienced a problem using different client/server versions with MySQL, and we have used them on a large scale in production.

I don't believe a word of it. If phpmyadmin says it, does not necessarily mean it's true.

MySQL client/server versions are very largely compatible, unless you're looking at very elderly versions of either of them (i.e. < 5.0)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文