title: create database using sudo mysql -u=root
body: <p>I am having problem rightnow because when I am logging in on mysql using command line via <code>mysql -u=root</code> it gives me an error like this <code>ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)</code></p>
  
  <p>but when I try to use <code>sudo mysql -u=root</code> I manage to go to mysql promp <code>mysql&gt;</code> the problem is when I try to create a database using the command <code>create database dbname</code> I got an error that says <code>ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'dbname'</code></p>
  
  <p>Additional informaion:</p>
  
  <p><code>mysql&gt; select user();</code></p>
  
  <pre><code>+--------------------+
  | user()             |
  +--------------------+
  | =root@localhost    |
  +--------------------+
  1 row in set (0.00 sec)
  </code></pre>