title: permission errors on database for full access user
body: <p>I am getting an error (on MySQL 5.7.25-google in Google cloud while locally MySQL 5.7.29, it works fine)</p>
  
  <p>Google Cloud, I run (NOTE: show tables shows this table existing from this same user!!!)</p>
  
  <pre><code>mysql&gt; show index from customers;
  ERROR 1146 (42S02): Table 'authtables.customers' doesn't exist
  </code></pre>
  
  <p>and locally (same user and password and setup), I get</p>
  
  <pre><code>mysql&gt; SHOW INDEX FROM customers;
  +-----------+------------+------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
  | Table     | Non_unique | Key_name                     | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
  +-----------+------------+------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
  | customers |          0 | PRIMARY                      |            1 | id          | A         |           2 |     NULL | NULL   |      | BTREE      |         |               |
  </code></pre>
  
  <p>Of course, the command SHOW TABLES; works the same on both and shows the CUSTOMERS table in both!!!  grrrr.</p>
  
  <p>I followed the accepted answer in the link below EXCEPT for 1 minor detail for setup of 'authservice' user to 'authtables' database...</p>
  
  <p><a href="https://stackoverflow.com/questions/16287559/mysql-adding-user-for-remote-access/16287647">Mysql adding user for remote access</a></p>
  
  <p>The ONE detail is my grant statements were authtables.* so that the user had full access to the authtables database and nothing else.</p>
  
  <p>NEXT is my show grants command in GCP and locally which yield the EXACT same result but in case I am missing a typo, here is the GCP then the local result</p>
  
  <pre><code>mysql&gt; show grants for 'authservice'@'localhost';
  +---------------------------------------------------------------------+
  | Grants for authservice@localhost                                    |
  +---------------------------------------------------------------------+
  | GRANT USAGE ON *.* TO 'authservice'@'localhost'                     |
  | GRANT ALL PRIVILEGES ON `authtables`.* TO 'authservice'@'localhost' |
  +---------------------------------------------------------------------+
  2 rows in set (0.08 sec)
  </code></pre>
  
  <p>local result is</p>
  
  <pre><code>mysql&gt; show grants for 'authservice'@'localhost';
  +---------------------------------------------------------------------+
  | Grants for authservice@localhost                                    |
  +---------------------------------------------------------------------+
  | GRANT USAGE ON *.* TO 'authservice'@'localhost'                     |
  | GRANT ALL PRIVILEGES ON `authtables`.* TO 'authservice'@'localhost' |
  +---------------------------------------------------------------------+
  2 rows in set (0.00 sec)
  </code></pre>
  
  <p>For completeness...
  GCP version: Server version: 5.7.25-google-log (Google)
  local version: Server version: 5.7.29 MySQL Community Server (GPL)</p>
  
  <p>WOW, crap, what is 5.7.25-google-log...ICK.  I wonder if it has a bug here.</p>
  
  <p>Also, why is grant have <em>.</em> when I look at my history in mysql to verify, I clearly did authtables.* EVERY time!!!</p>
  
  <p>Then, what happened to the 'authservice'@'%' grant as I don't see that either?</p>
  
  <p>Anyone have any idea how to setup google cloud mysql so I have a user with full access to the database so he is restricted to that database?  This seems kind of like some sort of google bug or am I doing something wrong?</p>
  
  <p>thanks,
  Dean</p>