title: Mysql query to discover current default database collation (via command line client)
body: <p>I can't figure out which is the query to run in order to see the current collation set for a mysql database. </p>
  
  <p>I know I can change it running a query like this:</p>
  
  <pre><code>ALTER DATABASE db_name
  [[DEFAULT] CHARACTER SET charset_name]
  [[DEFAULT] COLLATE collation_name]
  </code></pre>
  
  <p>but I don't want to do it without knowing the current value. </p>
  
  <p>I think it's actually possible because in phpmyadmin you can see the current value in the operation tab of your database, but I need to do it via the command line client and after googling a little bit I found no answers.</p>
  
  <p>Probably I will open phpmyadmin code to discover it.. before doing it, does anybody know which is the right query?</p>
  
  <p>Thanks in advance.</p>