title: How can I add an extra configuration file for mysql (my.cnf)
body: <p>I want to add and extra configuration file for MySQL on UNIX, let's call it my2.cnf. So when MySQL starts, it would read the options of that file too.</p>
  
  <p><a href="http://dev.mysql.com/doc/refman/5.0/en/option-files.html" rel="noreferrer">Here</a> it says that I can put a file  on the following places:</p>
  
  <ul>
  <li>/etc/my.cnf   </li>
  <li>SYSCONFDIR/my.cnf </li>
  <li>$MYSQL_HOME/my.cnf    </li>
  <li>defaults-extra-file   The file specified with --defaults-extra-file=path, if any</li>
  <li>~/.my.cnf User-specific options</li>
  </ul>
  
  <p>I would like something like this "default-extra-file", but avoiding to enter this command on the mysql prompt.</p>
  
  <p>Is there an option in the cnf file like:</p>
  
  <pre><code> extra-conf-file=/path/to/my/file/my2.cnf
  </code></pre>
  
  <p>(Unfortunately that does not work)</p>
  
  <p>Is that even possible? Can I use the default my.cnf file to add another configuration file that will be read when I start themysql service?</p>
  
  <p>(Using $MYSQL_HOME/my.cnf is good enough for me, but I would like to know if I can explicetely tell so it can be read or ignored according to the main my.cnf global file).</p>