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

前端 未结 3 794
天命终不由人
天命终不由人 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:25

    In your main installation folder for phpMyAdmin, you must have made a config.inc.php file, that is the file that you should be changing. Incase you don't have that file, then create it:

    In the main installation folder(pMA) you would already have a file named: config.sample.inc.php, which contains the default configurations. Make a copy of this file and rename it to config.inc.php, you can do that directly using cp command (after navigating into the said folder):

    cp ./config.sample.inc.php ./config.inc.php
    

    Now make a few changes to this new file:

    1. Change the entry $cfg['Servers'][$i]['host'] = 'localhost'; to $cfg['Servers'][$i]['host'] = '127.0.0.1'; (as it does not work in some places)
    2. Write/change this line: $cfg['Servers'][$i]['AllowNoPassword'] = false;

    Note: by the main installation folder for phpMyAdmin i mean the root folder of the installation of phpMyAdmin, i.e ///phpMyAdmin/.
    Also make the 2nd change first, and make the 1st change only if the host is not found

提交回复
热议问题