"Existing configuration file (./config.inc.php) cannot be read."?

Just installed XAMPP on my Mac. When I tried to change the download directory in config.inc.php , it says that the file was locked and cannot be unlocked because I do not have permission to change the folder. So I changed my permission to the folder and the file was no longer locked, but I can no longer access "phpmyadmin" in my browser via http://localhost/phpmyadmin/ , every time I try, it says "Existing configuration file (./config.inc.php) is not readable."

I googled the solution, from this page , it says to use chown root:cpanelphpmyadmin config.inc.php to change the file permission. I did, but it says chown: cpanelphpmyadmin: Invalid argument in my terminal window. I despaired here, someone helped me, please!

By the way, I tried to delete everything in the XAMPP folder in the App folder and create a new one, it does not work

+6
source share
5 answers
 rasel@rasel-Dell :~$ sudo -s rasel@rasel-Dell :~$ type your password root@rasel-Dell :/# cd /opt/lampp/phpmyadmin root@rasel-Dell :/opt/lampp/phpmyadmin# chmod 644 config.inc.php root@rasel-Dell :/opt/lampp/phpmyadmin# cd / root@rasel-Dell : /opt/lampp/lampp restart 

That is all, it works for me.

+17
source

For OSX versions of Mavericks and XAMPP 1.8.2-5 and 1.8.3-4 you need to use the same chmod 644 as above, but the directory is different.

 cd /Applications/XAMPP/xamppfiles/phpmyadmin/ sudo chmod 644 config.inc.php [enter your password] 
+9
source

I solved the problem by creating a new config.inc.php file, copying all the original locked contents of config.inc.php and changing the line

 $cfg['Servers'][$i]['password'] = 'myserverpassword'; 

and deleting the original locked file. This is the case if you are looking for a change to the XAMPP configuration file so that you can access the servers where you put the new password.

0
source
 cd /Applications/XAMPP/xamppfiles/phpmyadmin/ sudo chmod 777 config.inc.php [enter your password] 

After changing config.inc.php you need to enter:

 sudo chmod 644 config.inc.php 

Only sudo chmod 644 did not work for me.

0
source

If you are using ubuntu 14.04, then you really need to:

  • Go to terminal
  • type → sudo nautilus
  • a file dialog will open.
  • browse to the folder on the computer /opt/lampp/phpmyadmin/config.inc.php
  • open file
  • check for $ cfg ['Servers'] [$ i] ['password'] = '';
  • change the above LOC to $ cfg ['Servers'] [$ i] ['password'] = 'root';

and try opening phpmy admin. Your problem will be successfully resolved.

-1
source

Source: https://habr.com/ru/post/913782/


All Articles