升级到 phpMyAdmin-4.0.10.17-2.el6 时出现 phpMyAdmin 身份验证问题

升级到 phpMyAdmin-4.0.10.17-2.el6 时出现 phpMyAdmin 身份验证问题

我遇到了一个问题,在 CentOS 6 上将 phpMyAdmin 从 0:4.0.10.16-1.el6 例行升级到 phpMyAdmin-4.0.10.17-2.el6 时,登录 mysql 服务器时出现一些奇怪的行为。基本上,用户无法一致登录。我尝试以自己的身份登录并能够进入,但我的同事可以使用清除缓存的浏览器尝试登录,并遇到 #1045 - 无法登录 MySQL 服务器错误。奇怪的是,当页面重新加载时,用户名字段中显示我的用户名,就好像它试图访问我之前的会话一样。mysqld 错误日志还列出了这些后续失败尝试中的用户名。据我所知,我们没有安装 PHP APC 或类似的东西,也没有使用任何类型的 Apache 反向代理。

尝试从 PHPMyAdmin 服务器上的 bash shell 访问 MySQL 框,一切正常,正如预期的那样。此外,降级版本可以解决此问题。我查看了 phpmyadmin github 错误部分,没有发现任何人报告类似行为。

还有人遇到过这个问题吗?我可以启用任何类型的调试或详细日志记录来尝试查看这些身份验证尝试中发生的情况吗?

编辑:可能应该添加我们的配置文件...

<?php
/**
 * phpMyAdmin configuration file, you can use it as base for the manual
 * configuration. For easier setup you can use "setup/".
 *
 * All directives are explained in Documentation.html and on phpMyAdmin
 * wiki <http://wiki.phpmyadmin.net>.
 */

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = '<secret redacted>'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/* added to stop the stupid version check */
$cfg['VersionCheck'] = false;

/**
 * Server(s) configuration
 */
$i = 0;

// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use
// $cfg['Servers'][0]. You can disable a server config entry by setting host
// to ''. If you want more than one server, just copy following section
// (including $i incrementation) serveral times. There is no need to define
// full server array, just define values you need to change.

$db_servers = array(
<server names redacted>
);

foreach ($db_servers as $db_server) {
  $i++;
  $cfg['Servers'][$i]['host']          = $db_server;
  $cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
  $cfg['Servers'][$i]['extension']     = 'mysqli';    // The php MySQL extension to use ('mysql' or 'mysqli')
  $cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
  $cfg['Servers'][$i]['auth_type']     = 'cookie';      // Authentication method (config, http or cookie based)?
}

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload';
$cfg['SaveDir']   = '/var/lib/phpMyAdmin/save';

/*
 * Disable the default warning that is displayed on the DB Details Structure
 * page if any of the required Tables for the relation features is not found
 */
$cfg['PmaNoRelation_DisableWarning'] = TRUE;


//http://future500.nl/phpmyadmin-slow-on-startup/:
$cfg['MaxExactCountViews'] = 0;//disable trying to count the number of rows in any view
$cfg['MaxExactCount'] = 0;//disable correcting the InnoDB estimates

?>

答案1

经过大量研究,我们发现问题出在我们这边,就是 blowfish_secret 值。我向 EPEL 提交了一个错误,这可能是上游问题,但目前,只需确保您的

$cfg['blowfish_secret'] = 'XXXX'

... 32 个字符。(可能存在某个上限,但我们没有尝试确定这一点。

EPEL6 错误:https://bugzilla.redhat.com/show_bug.cgi?id=1380446

~汤米

相关内容