title: How to REVOKE privileges TO partition in MYSQL
body: <p>Is it possible to deny selecting from the partition for a specific user?</p>
  
  <p>The thing is that I need to implement a feature:
  1) A root user should have access to all data from 'products' table and its partitions
  2) A noroot user should have access to 'products' table and its specific partition</p>
  
  <p>I have such a schema:</p>
  
  <pre><code>CREATE TABLE `products` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `name` varchar(50) DEFAULT NULL,
   PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1
  
  ALTER TABLE products  PARTITION BY RANGE (id)
    (
      PARTITION p1 VALUES LESS THAN (5),
      PARTITION p2 VALUES LESS THAN MAXVALUE 
    );
  
  </code></pre>
  
  <p>So in a perfect world, I'd like to GRANT ALL PRIVILEGES to root user so that they can select all data from the 'products' table(from p1, p2 partitions) like: </p>
  
  <pre><code>SELECT * FROM products;
  </code></pre>
  
  <p>But for noroot user, I'd like to GRANT ALL PRIVILEGES to specific partition(p1) so that they can select data from the 'products' table. Selecting data from 'products' table means that MYSQL goes ONLY to granted partitions(for our case it is p1) </p>
  
  <p>Guys, is it possible? Probably you have another solution, but keep in mind that I need 'common interface' for selecting data.</p>