NETID
V2EX  ›  问与答

现在 wordpress 支持 mysql 的默认密码验证方式了吗?

  •  
  •   NETID · Aug 25, 2022 · 1743 views
    This topic created in 1381 days ago, the information mentioned may be changed or developed.
    我记得从 mysql 的某个版本开始,采用了新型的密码验证方式,直接安装使用 wordpress 是无法链接数据库的。
    需要先把 mysql 的密码验证改成老版的才行。
    想问下现在 wordpress 支持 mysql 的默认密码验证方式了吗?还用再更改成老版的吗?
    6 replies    2022-08-25 09:47:30 +08:00
    Felldeadbird
        1
    Felldeadbird  
       Aug 25, 2022
    我记得好像是 mysql8 开始用新的密码认证导致的(要改用旧版的密码认证)。当时搜索过,PHP 官方没给解决方案。
    Rache1
        2
    Rache1  
       Aug 25, 2022
    跟 wp 无关,跟 php 版本有关。
    NETID
        3
    NETID  
    OP
       Aug 25, 2022
    @Rache1 那现在用 PHP8.1 可以直接连接了吗,还用改回老版验证吗?
    Rache1
        4
    Rache1  
       Aug 25, 2022
    @NETID

    PHP: 需求 - Manual
    https://www.php.net/manual/zh/mysqli.requirements.php

    根据捆绑的 MySQL nd 版本不同支持性可能不一样,具体没有测试过,文档中说 7.1.16 之前的不支持,但是我本机是 Windows ,实测 7.1.33 仍然不支持。

    php 7 的 changelog 里面 Windows 上是 7.4.4 开始支持的。
    Rache1
        5
    Rache1  
       Aug 25, 2022   ❤️ 1
    看来是在 PHP 7.4 就开始支持了。

    Fix PHP 7.4 + MySQL 8 errors with `server has gone away` • PHP.Watch
    https://php.watch/articles/PHP-7.4-MySQL-8-server-gone-away-fix
    NETID
        6
    NETID  
    OP
       Aug 25, 2022
    @Rache1 好的,多谢,看来 PHP8.1 应该可以了……
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   926 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 19:27 · PVG 03:27 · LAX 12:27 · JFK 15:27
    ♥ Do have faith in what you're doing.