title: Grant Privileges to an user (remotely root logged) in MySQL
body: <p>I have this:</p>
  
  <pre><code>mysql&gt; SELECT CURRENT_USER();
  +----------------+
  | CURRENT_USER() |
  +----------------+
  | root@%         |
  +----------------+
  1 row in set (0.00 sec)
  
  mysql&gt; SELECT USER();
  +------------------+
  | USER()           |
  +------------------+
  | root@CQ2404LA-PC |
  +------------------+
  1 row in set (0.00 sec)
  
  mysql&gt;
  mysql&gt; GRANT ALL PRIVILEGES ON `Company`.* TO 'TheUser'@'%' IDENTIFIED BY PASS
  WORD '*3814FFAFF303C7DBB5511684314B57577D754FF9';
  ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'Company'
  </code></pre>
  
  <p><strong>Access denied for user 'root'@'%' to database 'Company'</strong></p>
  
  <p>Now reviewing the root privileges I have:</p>
  
  <pre><code>mysql&gt; show grants for 'root'@'localhost';
  +-------------------------------------------------------------------------------
  ---------------------------------------------------------+
  | Grants for root@localhost
                                                           |
  +-------------------------------------------------------------------------------
  ---------------------------------------------------------+
  | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*158
  FB31F24156B52B2408974EF221C5100001544' WITH GRANT OPTION |
  | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION
                                                           |
  +-------------------------------------------------------------------------------
  ---------------------------------------------------------+
  2 rows in set (0.00 sec)
  </code></pre>
  
  <p>Before, I tested (Locally) And Works fine!.</p>
  
  <p>Now Remotely Privileges:</p>
  
  <pre><code>mysql&gt; show grants for 'root'@'%';
  +-------------------------------------------------------------------------------
  --------------------------------------------------------------------------------
  --------------------------------------------------------------------------------
  --------------------------------------------------------------------------------
  ---------------------------------------------------------------------------+
  | Grants for root@%
  
  
  
                                                                             |
  +-------------------------------------------------------------------------------
  --------------------------------------------------------------------------------
  --------------------------------------------------------------------------------
  --------------------------------------------------------------------------------
  ---------------------------------------------------------------------------+
  | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS,
   FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES,
   LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW
  VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'root'@'%' IDENTIFIED
   BY PASSWORD '*158FB31F24156B52B2408974EF221C5100001544' WITH GRANT OPTION |
  | GRANT PROXY ON ''@'' TO 'root'@'%' WITH GRANT OPTION
  </code></pre>
  
  <p>Doesn't work!!!, I think that it must work because:  "<strong>ON *.* TO 'root'@'%'</strong>"</p>
  
  <p><strong>Looking for the difference:</strong>
  'root'@'%' haven't CREATE TABLESPACE, EVENT and TRIGGER</p>
  
  <pre><code>mysql&gt; SELECT Host,     Event_priv,     Trigger_priv,   Create_tablespace_priv,
  authentication_string   FROM mysql.user WHERE USER = "root";
  +-----------+------------+--------------+------------------------+--------------
  ---------+
  | Host      | Event_priv | Trigger_priv | Create_tablespace_priv | authenticatio
  n_string |
  +-----------+------------+--------------+------------------------+--------------
  ---------+
  | localhost | Y          | Y            | Y                      |
           |
  | %         | N          | N            | N                      | NULL
           |
  +-----------+------------+--------------+------------------------+--------------
  ---------+
  2 rows in set (0.01 sec)
  
  mysql&gt;
  </code></pre>
  
  <p>But, I think that is not root of problem...</p>
  
  <p>Maybe The solution will be, to use: <strong>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'</strong>, but I think "all privileges" have other thing than "an amount of privileges".</p>