Friday, February 18, 2022

[FIXED] phpmyadmin error 13 permission denied

Issue

I was working with my php server & phpmyadmin for MYSQL. I wanted to install some packages with composer, than somehow I changed permissions on my project folder and than database from phpmyadmin disappeared. I lost everything. I am trying to recover it for 3 hours. I am receiving these errors when I am trying to import create_tables.sql

#13 - Can't get stat of './phpmyadmin' (Errcode: 13 - Permission denied)

and

Warning in ./libraries/dbi/DBIMysqli.php#261
 mysqli_query(): (HY000/1018): Can't read '.' (error code: 13 - Permission denied)

I am running on Web server: Apache/2.4.23 (Unix) PHP/5.6.25 libmysql - mysqlnd 5.0.11-dev

Database server: 5.7.16 - MySQL Community Server (GPL)

English errors

Does someone know how to fix this?


Solution

Seems that the web server cannot read some (or all) files in the phpmyadmin directory ((Errcode: 13 - Permission denied)).

You need to fix the permissions by executing the following commands, assuming the phpmyadmin is located at /path/to/phpmyadmin:

find /path/to/phpmyadmin -type d -exec chmod 755 {} \;
find /path/to/phpmyadmin -type f -exec chmod 644 {} \; 

Obviously, you need to replace /path/to/phpmyadmin with the actual path.



Answered By - jsalatas

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.