Changed password in phpMyAdmin on a Mac using XAMPP, now unable to access localhost/phpmyadmin

前端 未结 3 849
天命终不由人
天命终不由人 2021-01-22 08:02

I\'ve read all the posts I could find about this, and none helped. I\'ve deleted the XAMPP folder from my computer and reinstalled it from the DMG file, which of course fixed th

3条回答
  •  青春惊慌失措
    2021-01-22 08:37

    Although, @bool dev have provided an answer above. I would like to share my version of how i resolved this using the terminal. I am using 10.12.5 (OS Serria)

    Firstly, you need to have root access

    sudo su
    

    Then go to root folder

    cd /
    

    From there you need to navigate to the phpMyAdmin folder

    cd Applications/XAMPP/xamppfiles/phpmyadmin/
    

    Then using any editor open the config.inc.php file. (I used vi)

    vi config.inc.php
    

    Go to the following section in the file

    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = ''; // This is empty, set your password here
    

    Then just restart your MySql server. And viola it should be working now.

提交回复
热议问题