0

I'm attempting to setup login access as root user on phpMyAdmin. Having modified three lines in my config.inc.php file to:

$cfg['Servers'][$i]['user'] = 'root';  
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true; 

I have the following authentication and server parameters:

/* Authentication type */  
$cfg['Servers'][$i]['auth_type'] = 'cookie';  
/* Server parameters */  
$cfg['Servers'][$i]['host'] = 'eu-cdbr-azure-north-b.cloudapp.net';  // Replace with value     from connection string  
$cfg['Servers'][$i]['connect_type'] = 'tcp';  
$cfg['Servers'][$i]['compress'] = false;  
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['user'] = 'root';  
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true; 

However I am getting a #1045 error.

Any help would be appreciated, thanks.

3
  • Try $cfg['Servers'][$i]['host'] = 'localhost'; Mar 5, 2014 at 11:52
  • Should've specified, phpMyAdmin is not on Localhost
    – Ian
    Mar 5, 2014 at 11:56
  • But it will be still localhost Mar 5, 2014 at 12:35

2 Answers 2

0

MySQL account can have restrictions. You can login as root if you connect with localhost, the machine name or with 127.0.0.1.

1
  • Should've specified, phpMyAdmin is not on Localhost
    – Ian
    Mar 5, 2014 at 11:56
0

MySQL is (presumably) running on a remote server, the cloudapp.net domain you indicated in the configuration. However, if your phpMyAdmin (and the webserver it's running on) is not located on that network, odds are they drop the connection as a security measure. So if you're trying to set up phpMyAdmin on your own computer for use with the online/remote MySQL instance, it's probably not going to work. You generally need to perform database access from inside the network at your host. I am guessing that's what the others mean when they tell you to use localhost, although I'm completely not sure.

Try connecting from the command line. On your webserver, try running mysql -h eu-cdbr-azure-north-b.cloudapp.net -u root -p. If you have direct access to the database server, try running mysql -u root -p from there and see if that gives a different response. Sometimes MySQL is configured to not allow remote access, or to not allow root access from remote hosts.

Have you tried asking your host if this is something that should be possible?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.