Search code examples
phpmyadminxampp

xampp phpmyadmin access denied error(#2002)


Hi everyone i had mysql server running on 3306. I uninstalled that completely and installed XAMPP. Mysql was not running at the beginning, then I changed the port to 3307 in my.ini as well as configuration of CP. It is showing status as running now but phpmyadmin is giving error as access denied. I tried so many solutions but didnt help. Someone please help me. Thanks in advance.

enter image description here

enter image description here


Solution

  • Try this.

    Go to the directory where Xampp is installed. Lets call it xampp. Now open the file xampp/phpMyAdmin/config.inc.php in any text editor.

    Now find this line

    $cfg['Servers'][$i]['host'] = 'localhost';
    

    and change it to

    $cfg['Servers'][$i]['host'] = 'localhost:3307';
    

    Note: If you are on Windows, xampp is by default installed in C:\xampp