警告:mysql_real_escape_string():在easy-contact-forms-database.php的第152行,用户'root'@'localhost'被拒绝访问(使用密码:NO)

3

我正在使用一个名为Easy Contact Forms的WordPress插件。问题是它显示警告,因此我无法登录我的管理面板。警告如下:

Warning: mysql_real_escape_string(): Access denied for user 'root'@'localhost' (using password: NO) in /public_html/new/wp-content/plugins/easy-contact-forms/easy-contact-forms-database.php on line 152


Warning: mysql_real_escape_string(): A link to the server could not be established in /public_html/new/wp-content/plugins/easy-contact-forms/easy-contact-forms-database.php on line 152

我搜索了这个问题,但没有找到解决方案。

希望你们能给我一个解决这个问题的方法。

谢谢。


请查看此链接,它可能会有所帮助:https://dev59.com/JnTYa4cB1Zd3GeqP0Oqo - soorapadman
检查提供的数据库连接凭据。 - Niranjan N Raju
1个回答

1
我遇到了类似的问题。我无法真正确定问题所在,但我能够将其缩小到我的当前主题和Easy Contact Form插件。
这是我所做的,并且帮助了我:
A)使用FTP访问您的服务器。找到安装WordPress的目录。如果您使用共享托管,则大多数情况下位于public_html / yoursite文件夹中
B)转到wp-content / themes文件夹。将当前活动主题重命名为其他名称,例如“ theme-backup-date”。
C)转到wp-content / plugins /文件夹,并将Easy Contact Form插件也重命名为其他名称。
D)转到yoursite / wp-admin / themes.php 这将将站点恢复为默认主题,并省略与主题相关的错误。
E)现在,您应该能够登录到WordPress管理面板。登录后,删除不可用的插件(刚刚重命名的插件)。
F)再次返回上述主题文件夹(再次使用FTP客户端),并将其重命名回以前的名称。
C)如果仍然需要,请重新安装Contact Forms插件。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接