Q:

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

Hopefully someone can help me, for I have queried the web with no success or concrete answer to this error.   I’m using Windows and Xampp.   Here is the error I am getting after I have recently imported the database into phpmyadmin…
#1142 - SELECT command denied to user ''@'localhost' for table 'pma_table_uiprefs'

After I import the database, everything is fine in phpmyadmin until I log out and then log back in, this is where the problem lies.   When I click on any of the tables from the imported database, I get the following errors…
SELECT 'prefs'
FROM 'phpmyadmin'. 'pma_table_uiprefs'
WEHRE 'username' = 'root'
AND 'db_name' = 'afdb'
AND 'table_name' = 'role'

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

Thank you again for taking time to read my post and hopefully someone can help me with this error. 

A:

I stumble upon this issue and I solved it just by logging out of phpMyAdmin and in again. 

EXPLANATION
Take a look at the error message query:
SELECT command denied to user ''@'localhost' for table 'pma_table_uiprefs'

This happens due to MySQL denying access to user "" (blank) at server localhost.  The default setting is to block all requests from anonymous users. 
By logging out we force phpMyAdmin to "forget" the current user and let us input the login credentials for the MySQL server. 

A:

The pma_table_uiprefs table contains user preferences.  In phpMyAdmin's config.inc.php, access to this table (and other tables in the configuration storage) is done via the control user.  In your case, the controluser parameter is empty, therefore the query fails. 
For a short-term fix, put the "//" characters in config.inc.php at the start of this line:
    $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';

then log out and log back in. 
For a long-term fix, correctly set up the configuration storage, see http://docs.phpmyadmin.net/en/latest/setup.html#phpmyadmin-configuration-storage

A:

This Will Surely help you
1.open PhpMyAdmin. 
2.on the left side under the PhpMyAdmin logo click on second icon(Empty Session Data). 
3.that's it.