1

A have a live/production CentOS 6.8 server with Nginx, PHP (multiple versions), MySQL 5.7.18 and latest (when writing this question) phpMyAdmin 4.7.0.

This server is running for many years and with no problems, but recently I noticed a problem when I tried to delete a record from a table using phpMyAdmin, I got the following error:

#1142 - SELECT command denied to user 'test_user'@'localhost' for table 'pma__tracking'

Strange thing is that it deletes the record but it can't refresh the result after the deletion! Also, all SELECT queries work and every data browse successfully fetches data on each table!

I have each database to has its' own user with all privileges granted.

I have properly installed $cfg['Servers'][$i]['controluser'] and $cfg['Servers'][$i]['controlpass'] and all the tables exists inside $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; database.

My question is, why this is happening and how can I fix it? It's strange for me, because I expect that the user defined inside phpMyAdmin config should access pmadb ('pma'@'localhost') and the tables in it and NOT the user that connects to a database!

1 Answer 1

1

This ia a bug for PMA 4.7.0. Here is the bug tracking https://github.com/phpmyadmin/phpmyadmin/issues/13214

If anyone comes here with the same problem for PMA 4.7.0, then open the PMA/libraries/Tracker.php and alter the following lines:

Index: Tracker.php
===================================================================

// - Remove/Comment
$result = $GLOBALS['dbi']->fetchValue($sql_query);

// + Add
$row = $GLOBALS['dbi']->fetchArray(PMA_queryAsControlUser($sql_query));

// - Remove/Comment
return ($result == 1);

// + Add
return isset($row[0])
    ? $row[0]
    : -1;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.