title: Grant privileges mysql server
body: <p>I'm trying to grant privileges to my IP address for MySQL server. I don't know how can I say it exactly because of my english too, so please be patient.</p>
  
  <p>xx.xxx.xxx.xx - My IP</p>
  
  <pre><code>CREATE USER 'root'@'xx.xxx.xxx.xx' IDENTIFIED BY 'password';
  GRANT ALL ON *.* TO 'root@xx.xxx.xxx.xx' IDENTIFIED BY 'password';
  FLUSH PRIVILEGES;
  </code></pre>
  
  <p>This error I got:</p>
  
  <pre><code>#1227 - Access denied; you need the CREATE USER privilege for this operation 
  </code></pre>
  
  <p>Could anyone help me please?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I made a command</p>
  
  <pre><code>SHOW GRANTS;
  
  Grants for sukup-parkety@localhost
  GRANT USAGE ON *.* TO 'sukup-parkety'@'localhost' IDENTIFIED BY PASSWORD 'somepassword'
  GRANT ALL PRIVILEGES ON `sukup\_parkety`.* TO 'sukup-parkety'@'localhost' WITH GRANT OPTION
  </code></pre>
  
  <p><strong>EDIT2:</strong>
  Ok, so I made other command</p>
  
  <pre><code>GRANT ALL ON sukup_parkety.* TO 'root@xx.xxx.xxx.xx' IDENTIFIED BY 'mypassword';
  </code></pre>
  
  <p>But it reports the length error?</p>
  
  <pre><code>#1470 - String 'root@xx.xxx.xxx.xx' is too long for user name (should be no longer than 16) 
  </code></pre>