title: Creating a new user with SQL on PhpMyAdmin
body: <p>For a school project we have to develop a simple database that allows different users to have certain privileges over the database.  Anyway I have been struggling with the creation part, we were giving an example of code that can be used to create users and assign them to a database, however, it is not working.</p>
  
  <pre><code> SELECT Host, User from mysql.user;
  
  CREATE USER ‘David’ @‘localhost’ IDENTIFIED BY ‘password’;
  SELECT Host, User from mysql.user;
  Show databases;
  Create database mydatabase;
  Use mydatabase;
  grant all on mydatabase.*to ‘David’ @‘localhost’;
  set password for ‘David’ @‘localhost’ = password (‘newpassword’);
  </code></pre>
  
  <p>I do not know what is going on and how this actually works.  I have PHPmyAdmin, SQL and Apache running on the server.  Sorry if this question seems vague (or too simple )but it has been bothering me for a few hours now.  Is it a mistake in the code?</p>
  
  <p>NOTE* LOCALHOST is my connection and this code is just an example</p>