title: Is there a secure way to set up a mysql root password?
body: <p>In <a href="http://www.howtogeek.com/howto/programming/mysql/set-the-mysql-root-password/" rel="nofollow noreferrer">this how-to geek article</a>, the author talked about using</p>
  
  <pre><code>mysqladmin -u root -h host_name password “newpassword”
  </code></pre>
  
  <p>To set a new password. A person replied that that may leave the password in the shell's history file, and suggested using</p>
  
  <pre><code>mysql -u root mysql
  mysql&gt; SET PASSWORD FOR root@localhost=PASSWORD(’newpasswordgoeshere’);
  </code></pre>
  
  <p>but another person said that it'd leave the password in the .mysql_history file.</p>
  
  <p>Security isn't an issue for me (no-one else should have access to my computer), but is there a better alternative?</p>