title: mysql forgets who is logged in: command denied to user ''@'%'
body: <p>Running <code>show grants;</code> indicates that I am logged in as a user with all privileges on a database.</p>
  
  <p>Running <code>show table status;</code> results in an error.  And the error does not show the username I am logged in as!</p>
  
  <p>It's as if, for this command, mysql forgets who I am.  Other select statements work fine.  Can anyone explain this?  How to fix?  Thanks.</p>
  
  <pre><code>Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 2
  Server version: 5.5.13-log Source distribution
  
  Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  
  Oracle is a registered trademark of Oracle Corporation and/or its
  affiliates. Other names may be trademarks of their respective
  owners.
  
  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  
  mysql&gt; show grants;
  +---------------------------------------------------------------------------------------------------------------------+
  | Grants for php@localhost                                                                                            |
  +---------------------------------------------------------------------------------------------------------------------+
  | GRANT ALL PRIVILEGES ON *.* TO 'php'@'localhost' IDENTIFIED BY PASSWORD '*8F5FF90079BC601F8EA7C148475658E65A0C029D' |
  | GRANT ALL PRIVILEGES ON `sunflower_work`.* TO 'php'@'localhost'                                                     |
  | GRANT ALL PRIVILEGES ON `news_demo`.* TO 'php'@'localhost'                                                          |
  | GRANT ALL PRIVILEGES ON `news_base`.* TO 'php'@'localhost'                                                          |
  +---------------------------------------------------------------------------------------------------------------------+
  4 rows in set (0.00 sec)
  
  mysql&gt; show table status from sunflower_work;
  ERROR 1143 (42000): SELECT command denied to user ''@'%' for column 'uid' in table 'users'
  mysql&gt;
  </code></pre>
  
  <p>update... as suggested by Tomalak, I deleted the user and recreated with fuller privileges and no password.  Still the problem persists.  Now it looks like this:</p>
  
  <pre><code>mysql&gt; show grants;
  +--------------------------------------------------+
  | Grants for php@localhost                         |
  +--------------------------------------------------+
  | GRANT ALL PRIVILEGES ON *.* TO 'php'@'localhost' |
  +--------------------------------------------------+
  1 row in set (0.00 sec)
  
  mysql&gt; show table status;
  ERROR 1143 (42000): SELECT command denied to user ''@'%' for column 'uid' in table 'users'
  mysql&gt; 
  </code></pre>