6

I want to try phpMyAdmin in local starting it from webmatrix... It's regularly show the login page, but i've problem to login.. Each attempt it retrieve me #2002 Impossibile to login into MySQL server

Once downloaded the last version of phpMyAdmin, i've created a config.inc.php file such suggested in the official guide.. I've tryied a lot of parameters without success. The actual configuration of the file is that:

<?php

    /* Servers configuration */
    $i = 0;

    /* Server: localhost [1] */
    $i++;
    $cfg['Servers'][$i]['verbose'] = 'localhost';
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['port'] = '';
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'HTTP';
    $cfg['Servers'][$i]['extension'] = 'mysql';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'pass';
    $cfg['Servers'][$i]['AllowNoPassword'] = true;

    /* End of servers configuration */

    $cfg['DefaultLang'] = 'en-utf-8';
    $cfg['ServerDefault'] = 1;
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';

    ?>

where i've wrong?

Sonia
  • 253
  • 1
  • 3
  • 16
  • Same problem. I've already made sure [MySQL Server is up and running.](http://upcode.wordpress.com/2011/09/08/phpmyadmin-error-2002-cannot-log-in-to-the-mysql-server/) and my Wordpress install works fine (it uses the same database, username/password same) – laggingreflex May 04 '13 at 01:53
  • maybe try [auth_type](http://wiki.phpmyadmin.net/pma/Auth_types) 'config' ? – mb21 May 08 '13 at 13:13

1 Answers1

2

I have traced two solutions to your problem, please try choosing one which works.

Solution : 1

You have set a password for MySQL as pass , but you have set the flag to TRUE under this setting. $cfg['Servers'][$i]['AllowNoPassword'] = true;

Try setting the flag to FALSE like this

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

Solution : 2

Since you are logging in as root user for MySQL, you need to change the above mentioned configuration setting to

$cfg['Servers'][$i]['AllowNoPasswordRoot'] = false;
Shankar Narayana Damodaran
  • 68,075
  • 43
  • 96
  • 126