1

我在 OSX 上使用 CakePHP 和 Xampp,最近第一次安装了 wordpress。我更改了一些密码,但我没有意识到这会影响 PHPMyAdmin。在尝试访问 localhost/phpmyadmin 时,系统会提示我登录屏幕。我记下了我更改的密码和用户名,但它仍然不允许我进入。我收到以下错误

Authentication required!

This server could not verify that you are authorized to access the URL "/phpmyadmin". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

我试过按照这篇文章的建议做,但没有奏效。

这是我的 config.inc.php 文件的内容

$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

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

/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/*
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
#$cfg['Servers'][$i]['controluser'] = 'pma';
# commented out by xampp security
#$cfg['Servers'][$i]['controlpass'] = '';
#$cfg['Servers'][$i]['controlpass'] = '';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

我什至尝试重新安装 XAMPP。我已经清除了每次更改之间的浏览器历史记录。

4

2 回答 2

5

在您的 config.inc.php 中,替换

    $cfg['Servers'][$i]['auth_type'] = 'config';

    $cfg['Servers'][$i]['auth_type'] = 'cookie';

然后您将获得“正常”的 phpMyAdmin 登录屏幕(带有帆船徽标)。

于 2013-09-15T11:00:14.400 回答
1

在您的config.inc.php文件中注意以下内容(对我来说是第 21 行):

$cfg['Servers'][$i]['password'] = '';

如果您在此处输入密码并通过管理面板重新启动 MySQL,您应该能够进入,无论如何它对我有用。

于 2016-06-29T20:50:55.950 回答