简体   繁体   中英

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

I'm using the My-SQL service on IBM Bluemix, for which I've deployed phpmyadmin-cf application to perform db operations. Before deploying I set

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

in the config.inc.php

However, when I try to login as root, with credentials:

Username: root

Password: ''

I get the following error: Cannot log in to the MySQL server

How do I solve this?

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

The line above need to be added twice; once within within the if (!empty($dbname)) { statement, and another one outside of it (probably towards the end of the configuration file).

It should be as the following example;

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM