phpmyadmin error #261 need help

March 5, 2019 710 views
PHP Ubuntu 16.04

I’m unsure what happened to phpmyadmin? Here’s the error message:

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

Backtrace

./libraries/dbi/DBIMysqli.class.php#261: mysqli_query(
object,
string 'SELECT *, CAST(BIN_NAME AS CHAR CHARACTER SET utf8) AS SCHEMA_NAME FROM (SELECT BINARY s.SCHEMA_NAME AS BIN_NAME, s.DEFAULT_COLLATION_NAME FROM `information_schema`.SCHEMATA s GROUP BY BINARY s.SCHEMA_NAME, s.DEFAULT_COLLATION_NAME ORDER BY BINARY `SCHEMA_NAME` ASC) a',
integer 0,
)
./libraries/DatabaseInterface.class.php#244: PMA_DBI_Mysqli->realQuery(
string 'SELECT *, CAST(BIN_NAME AS CHAR CHARACTER SET utf8) AS SCHEMA_NAME FROM (SELECT BINARY s.SCHEMA_NAME AS BIN_NAME, s.DEFAULT_COLLATION_NAME FROM `information_schema`.SCHEMATA s GROUP BY BINARY s.SCHEMA_NAME, s.DEFAULT_COLLATION_NAME ORDER BY BINARY `SCHEMA_NAME` ASC) a',
object,
integer 0,
)
./libraries/DatabaseInterface.class.php#2048: PMA_DatabaseInterface->tryQuery(
string 'SELECT *, CAST(BIN_NAME AS CHAR CHARACTER SET utf8) AS SCHEMA_NAME FROM (SELECT BINARY s.SCHEMA_NAME AS BIN_NAME, s.DEFAULT_COLLATION_NAME FROM `information_schema`.SCHEMATA s GROUP BY BINARY s.SCHEMA_NAME, s.DEFAULT_COLLATION_NAME ORDER BY BINARY `SCHEMA_NAME` ASC) a',
object,
integer 0,
boolean false,
)
./libraries/DatabaseInterface.class.php#1000: PMA_DatabaseInterface->fetchResult(
string 'SELECT *, CAST(BIN_NAME AS CHAR CHARACTER SET utf8) AS SCHEMA_NAME FROM (SELECT BINARY s.SCHEMA_NAME AS BIN_NAME, s.DEFAULT_COLLATION_NAME FROM `information_schema`.SCHEMATA s GROUP BY BINARY s.SCHEMA_NAME, s.DEFAULT_COLLATION_NAME ORDER BY BINARY `SCHEMA_NAME` ASC) a',
string 'SCHEMA_NAME',
NULL,
NULL,
)
./server_databases.php#86: PMA_DatabaseInterface->getDatabasesFull(
NULL,
integer 0,
NULL,
string 'SCHEMA_NAME',
string 'ASC',
integer 0,
integer 100,
)

I don’t know what I’m reading, can anyone help me?

1 Answer

Hey friend,

I believe this is the key:

mysqli_query(): (HY000/1018): Can't read dir of '.' (errno: 13 - Permission denied)

You may need to make sure that the web server user (most often www-data) is the owner of the directory containing phpmyadmin.

https://www.howtoforge.com/linux-chown-command/

Jarland

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!