WordPress当MariaDB与pam+ldap集成时,MariaDB身份验证不起作用

大家好。 我已经用mariadb-10.3在自己的服务器上安装了wordpress,一切正常,直到我决定将我的mariadb安装与PAM集成(使用在服务器上本地创建的用户进行身份验证)。 数据库用户名是\"casafamilia\",我所做的是删除当前数据库用户和再添加一次,但现在根据PAM进行身份验证: MariaDB [(none)]> drop user casafamilia@localhost;Query OK, 0 rows affected (0.001 sec)MariaDB [(none)]> CREATE USER \"casafamilia\"@\"localhost\" IDENTIFIED VIA pam;Query OK, 0 rows affected (0.001 sec)MariaDB [(none)]> GRANT ALL ON casafamilia.* TO casafamilia@localhost;Query OK, 0 rows affected (0.001 sec) 在命令行上,用户的身份验证很好: # mysql -u casafamilia -p casafamiliaEnter password: Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -AWelcome to the MariaDB monitor.Commands end with ; or g.Your MariaDB connection id is 60Server version: 10.3.17-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type \"help;\" or \"h\" for help. Type \"c\" to clear the current input statement.MariaDB [casafamilia]> ,我还更新了wp-配置.php密码正确。 启用反调试模式时,出现以下消息: Warning: mysqli_real_connect(): The server requested authentication method unknown to the client [dialog] in /var/www/casafamilia.org.br/wp-includes/wp-db.php on line 1612Warning: mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client in /var/www/casafamilia.org.br/wp-includes/wp-db.php on line 1612The server requested authentication method unknown to the client 我的猜测是,WordPress验证用户的方式,特别是考虑到它使用哈希和盐类使其更安全,使得它与MariaDB+PAM不兼容。 任何帮助都将不胜感激。 - 此主题修改了1年,7个月前,rodrigorenie提供了我需要帮助的页面:[登录以查看链接]@rodrigorenie目前可以通过库和Mysqlnd访问php,您只能使用它mysql_native_password(不带插件)https://mysqlserverteam.com/upgrading-to-mysql-8-0-default-authentication-plugin-considerations/。https://www.php.net/manual/en/mysqli.requirements.php据我所知,较新的MySQL(和MariaDB)版本已经更改了默认的身份验证机制,但我不认为是这样的。如果我按照本文所述创建了用户,那么在mysql数据库中,用户看起来是这样的:[根@renie~]#mysql-u root-p mysqlEnter password:读取表信息以完成表名和列名您可以关闭此功能,使用-AWelcome到马里亚布监视器命令以;或g结尾。您的MariaDB连接id是76Server版本:10.3.17-MariaDB-MariaDB-ServerCopyright(c)20002018,Oracle,MariaDB Corporation Ab and其他.类型\"help;\"或\"h\"表示帮助。键入\"c\"清除当前输入报表.MariaDB[mysql]>;选择主机、用户、密码、plugin from User where>展开如果我删除此用户并再次创建它,但现在没有选择PAM模块,网站将再次运行:MariaDB[mysql]>;drop Usercasafamilia@localhost;查询确定,0行受影响(0.001秒)MariaDB[mysql]>;创建用户casafamilia@localhost由\"<;thepassword>;\"标识;查询确定,0行受影响(0.001秒)MariaDB[mysql]>;在casafamilia上授予所有。*到casafamilia@localhost;查询确定,0行受影响(0.001秒)MariaDB[mysql]>;选择主机、用户、密码,来自用户的插件,其中>+----+----+----++|主机|用户|密码|插件|+----+----+----+|本地主机| casafamilia |*8D1F8D2F46037C0132088E2A9DBCAF0268FA7360||+---+---+---+---+---+集合中的1行(0.001秒)无论如何,这不是WordPress问题,而是PHP mysql实现限制,但是我找不到解决这个问题的方法。我在堆栈溢出中做了一个更通用的post:https://stackoverflow.com/questions/58906232/php-cant-connect-to-mariadb-when-use-auth-pam-module-to-authenticate-databa客户端未知的服务器请求的身份验证方法php客户端mysqlndclibrary(connector)的接口,除了本机的身份验证方法外,它不支持其他身份验证方法…我希望我更清楚一些。对于PHP 7.4,它支持缓存sha2_password(即,除了本地方法)https://github.com/php/php src/commit/4f06e67ad2201390ed35a9ea6288a00c0b04782b⋯comment-是的,非常感谢。基本上,如果我使用的是PHP,我会坚持使用本机身份验证方法。在上面的堆栈交换链接中,有一个用户提供了一个解决方案。只需在MySQL/MariaDB[server]部分和mysqli成功连接到数据库

admin_action_{$_REQUEST[‘action’]}

do_action( "admin_action_{$_REQUEST[‘action’]}" )动作钩子::在发送“Action”请求变量时激发。Action Hook: Fires when an ‘action’ request variable is sent.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$_REQUEST['action']引用从GET或POST请求派生的操作。源码(Source)更新版本源码位置使用被使用2.6.0 wp-admin/admin.php:...

日期:2020-09-02 17:44:16 浏览:1170

admin_footer-{$GLOBALS[‘hook_suffix’]}

do_action( "admin_footer-{$GLOBALS[‘hook_suffix’]}", string $hook_suffix )操作挂钩:在默认页脚脚本之后打印脚本或数据。Action Hook: Print scripts or data after the default footer scripts.目录锚点:#说明#参数#源码说明(Description)钩子名的动态部分,$GLOBALS['hook_suffix']引用当前页的全局钩子后缀。参数(Parameters)参数类...

日期:2020-09-02 17:44:20 浏览:1071

customize_save_{$this->id_data[‘base’]}

do_action( "customize_save_{$this-&gt;id_data[‘base’]}", WP_Customize_Setting $this )动作钩子::在调用WP_Customize_Setting::save()方法时激发。Action Hook: Fires when the WP_Customize_Setting::save() method is called.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_data...

日期:2020-08-15 15:47:24 浏览:807

customize_value_{$this->id_data[‘base’]}

apply_filters( "customize_value_{$this-&gt;id_data[‘base’]}", mixed $default )过滤器::过滤未作为主题模式或选项处理的自定义设置值。Filter Hook: Filter a Customize setting value not handled as a theme_mod or option.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_date['base'],指的是设置...

日期:2020-08-15 15:47:24 浏览:900

get_comment_author_url

过滤钩子:过滤评论作者的URL。Filter Hook: Filters the comment author’s URL.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/comment-template.php:32610...

日期:2020-08-10 23:06:14 浏览:930

network_admin_edit_{$_GET[‘action’]}

do_action( "network_admin_edit_{$_GET[‘action’]}" )操作挂钩:启动请求的处理程序操作。Action Hook: Fires the requested handler action.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$u GET['action']引用请求的操作的名称。源码(Source)更新版本源码位置使用被使用3.1.0 wp-admin/network/edit.php:3600...

日期:2020-08-02 09:56:09 浏览:877

network_sites_updated_message_{$_GET[‘updated’]}

apply_filters( "network_sites_updated_message_{$_GET[‘updated’]}", string $msg )筛选器挂钩:在网络管理中筛选特定的非默认站点更新消息。Filter Hook: Filters a specific, non-default site-updated message in the Network admin.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分$_GET['updated']引用了非默认的...

日期:2020-08-02 09:56:03 浏览:864

pre_wp_is_site_initialized

过滤器::过滤在访问数据库之前是否初始化站点的检查。Filter Hook: Filters the check for whether a site is initialized before the database is accessed.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/ms-site.php:93910...

日期:2020-07-29 10:15:38 浏览:834

WordPress 的SEO 教学:如何在网站中加入关键字(Meta Keywords)与Meta 描述(Meta Description)?

你想在WordPress 中添加关键字和meta 描述吗?关键字和meta 描述使你能够提高网站的SEO。在本文中,我们将向你展示如何在WordPress 中正确添加关键字和meta 描述。为什么要在WordPress 中添加关键字和Meta 描述?关键字和说明让搜寻引擎更了解您的帖子和页面的内容。关键词是人们寻找您发布的内容时,可能会搜索的重要词语或片语。而Meta Description则是对你的页面和文章的简要描述。如果你想要了解更多关于中继标签的资讯,可以参考Google的说明。Meta 关键字和描...

日期:2020-10-03 21:18:25 浏览:1727

谷歌的SEO是什么

SEO (Search Engine Optimization)中文是搜寻引擎最佳化,意思近于「关键字自然排序」、「网站排名优化」。简言之,SEO是以搜索引擎(如Google、Bing)为曝光媒体的行销手法。例如搜寻「wordpress教学」,会看到本站的「WordPress教学:12个课程…」排行Google第一:关键字:wordpress教学、wordpress课程…若搜寻「网站架设」,则会看到另一个网页排名第1:关键字:网站架设、架站…以上两个网页,每月从搜寻引擎导入自然流量,达2万4千:每月「有机搜...

日期:2020-10-30 17:23:57 浏览:1308