title: What's the difference between 127.0.0.1, localhost, [hostname] in mysql.user table
body: <p>Below is the result of the query <code>select host, user from mysql.user</code> from a fresh installed MySQL 5.</p>
  
  <pre><code>+-----------+------------------+
  | host      | user             |
  +-----------+------------------+
  | 127.0.0.1 | root             |
  | localhost | debian-sys-maint |
  | localhost | root             |
  | ubuntu    | root             |
  +-----------+------------------+
  </code></pre>
  
  <p><code>127.0.0.1</code>, <code>localhost</code>, and <code>ubuntu</code> all point to the same machine, which is the local host. I can't find any difference after removing the rows with the seemingly duplicate host/user pairs from the table.</p>
  
  <p>What's the difference between these? Can I safely remove the other two?</p>