title: sakila ERROR 1044 (42000) at line 46412: Access denied for user 'ted'@'localhost' to database 'sakila'
body: <p>My OS is Ubuntu 16.04 LTS and I am deploying the sakila database for learning mysql and have done the following:</p>
  
  <ol>
  <li>Downloaded the file "sakila-db.tar.gz from <a href="https://downloads.mysql.com/docs/" rel="nofollow noreferrer">https://downloads.mysql.com/docs/</a>
  to the directory "/tmp" with no problem</li>
  <li><code>$ cd /tmp</code></li>
  <li>$ gzip -cd sakila-db.tar.gz | tar xvf - 
   Files sakila-data.sql, sakila-schema.sql and sakila.mwb were extracted to diredctory "sakila-db"</li>
  <li><code>$ cd sakila-db</code></li>
  <li><code>$ mysql -u root -p &lt; sakila-schema.sql</code> 
  (command executed successfully)</li>
  <li><code>$ mysql -u root -p</code><br>
   (to grant privileges to user for the sakila database)</li>
  <li><p>mysql> GRANT CREATE, DROP, ALTER, INSERT, UPDATE, SELECT, DELETE,
  INDEX, CREATE VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE,
  TRIGGER, INDEX ON sakila.* TO 'jump'@'localhost';</p>
  
  <p>(command executed successfully)</p></li>
  <li><code>mysql&gt; GRANT SUPER, RELOAD, FILE ON *.* TO 'ted'@'localhost';</code>
  (granting these global commands to user ted - command executed OK)</li>
  <li>mysql> exit</li>
  <li><p>Trying to populate the sakila tables with data from <code>sakila-data.sql</code></p>
  
  <p>$ mysql -u ted -p &lt; sakila-data.sql</p></li>
  </ol>
  
  <p>Enter password: </p>
  
  <pre><code>ERROR 1044 (42000) at line 46412: Access denied for user 'ted'@'localhost' to database 'sakila'
  </code></pre>
  
  <p>This is my problem, can anyone help me solve this?</p>