Phpmyadmin';无法登录MySQL服务器';为root用户使用phpMyAdmin为云铸造和blue


Phpmyadmin 'Cannot log in to the MySQL server' for root user using phpMyAdmin ready for cloud foundry and bluemix mysql service

我在IBM Bluemix上使用My SQL服务,为此我部署了phpmyadmin-cf应用程序来执行数据库操作。在部署之前,我设置

$cfg['Servers'][$i]['AllowNoPassword'] = true;

在config.inc.php 中

然而,当我尝试以root身份登录时,使用凭据:

用户名:根

密码:"

我得到以下错误:无法登录到MySQL服务器

我该如何解决此问题?

$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

上面的行需要添加两次;一次在if(!empty($dbname)){语句内,另一次在语句外(可能在配置文件的末尾)。

它应该是以下的例子;

if (!empty($dbname)) {
    // other configuration options
    $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
    // it should be placed before the following line
    $i++;
}
// other configuration options
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;