title: how to log in to mysql and query the database from linux terminal
body: <p>I am using debian linux.
  I have a linux machine on which mysql is install.
  I can log in to my linux machine using root user as well as other user.
  I can connect to mysql database on linux machine from windows machine using sqlyog.
  Now I want to execute queries on linux machine only using linux terminal</p>
  
  <p>I tried some following things on terminal</p>
  
  <p>I went to root directory then I went to /var/lib directory</p>
  
  <p>I run following commands on terminal</p>
  
  <pre><code>mysqladmin -u root -p
  mysqladmin -u root -ppassword
  </code></pre>
  
  <p>everytime I have get following error message</p>
  
  <blockquote>
    <p>ERROR 1045 (28000) Access denied for
    user 'root'@'localhost' (Using
    password NO)</p>
  </blockquote>
  
  <p>please guide me for following</p>
  
  <ol>
  <li>How do I get mysql prompt in linux terminal?</li>
  <li>How I stop the mysql server from linux terminal?</li>
  <li>How I start the mysql server from linux terminal?</li>
  <li>How do I get mysql prompt in linux terminal?</li>
  <li>How do I login to mysql server from linux terminal?</li>
  <li>How do I solve following error?</li>
  </ol>
  
  <blockquote>
    <p>ERROR 1045 (28000) Access denied for
    user 'root'@'localhost' (Using
    password NO)</p>
  </blockquote>
  
  <p>Please give me solutions for above question.
  Thank You</p>