【问题标题】:Cant access phpMyAdmin after changing the privileges username and password (ERROR1405)更改权限用户名和密码后无法访问 phpMyAdmin (ERROR1405)
【发布时间】:2015-05-01 00:47:15
【问题描述】:

更改权限后我似乎无法重新进入 phpMyAdmin,我不断收到以下错误:

错误 1405

MySQL 说:文档

1045 - 用户“root”@'localhost' 的访问被拒绝(使用密码:YES)

我在 Mac 上使用 XAMPP。不知道如何解决这个问题,有什么想法吗?

【问题讨论】:

  • config.inc.php 中,您的 auth_type 是什么——配置、cookie 或 http?我建议的第一件事是清除与 phpMyAdmin 相关的浏览器 cookie(它们以“pma”开头)并重试,或尝试新的浏览器。尝试使用您的用户名和密码mysql -u root -p 在命令行登录或使用您的用户名而不是 root。

标签: php mysql macos phpmyadmin xampp


【解决方案1】:

您必须前往C:\xampp\phpMyAdmin\config.inc.php 并编辑该文件。默认文件(未设置任何密码)如下所示。

<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
  • 如果您记得密码,则可以直接在密码字段中输入。
  • 如果您不记得设置任何密码并且它仍然显示一些值,请将其更改为 ''(空字符串)。
  • 如果这不起作用,则以管理员身份打开命令行界面并键入sc delete mysql。这将删除您在 mysql 中所做的先前设置。
  • 现在重新启动 xammp 服务器并打开 phpMyAdmin。

【讨论】:

    猜你喜欢
    • 2014-04-21
    • 2019-08-15
    • 2015-05-15
    • 2012-10-12
    • 2020-06-16
    • 2016-01-30
    • 2011-10-29
    • 1970-01-01
    • 2018-10-02
    相关资源
    最近更新 更多