title: Ant build file cannot find mysql program
body: <p>I'm learning Java and Eclipse on a Mac.  I have an Ant build file in a project that contains sql statements to create a MySql database and tables and insert rows to set up data for the project.  I have MySql set up correctly and can use the "mysql" command in terminal with no problem, but when I run the Ant build.xml file in Eclipse, I get:  <strong>"BUILD FAILED.  Cannot run program "mysql": error=2, No such file or directory"</strong>
  I have done the following without success:</p>
  
  <ol>
  <li>Added /usr/local/mysql/bin to my path and verified with "echo $PATH". </li>
  <li>Added /usr/local/mysql/bin to my classpath in Eclipse through "properties" on the project.</li>
  <li>Added build.xml to the build path in Eclipse (just for grins.)</li>
  </ol>
  
  <p>I am running:</p>
  
  <ul>
  <li>Mac OS X 10.7.1</li>
  <li>Eclipse Indigo Build id: 20110615-0604</li>
  <li>MySql 5.5.15-osx10.6-x86_64</li>
  </ul>
  
  <p>Thanks for your help!</p>
  
  <p>Here is my build.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project name="publisher" default="all" basedir="."&gt;
      &lt;property name="mysql.params" value="-u publisher -ppublisher -D publisher" /&gt;
      &lt;target name="all" depends="cleandb, createdb, insertdb"&gt;&lt;/target&gt;
  
      &lt;target name="cleandb"&gt;
          &lt;exec executable="mysql" input="cleandb.sql"&gt;
              &lt;arg line="${mysql.params}" /&gt;
          &lt;/exec&gt;
      &lt;/target&gt;
  
      &lt;target name="createdb"&gt;
          &lt;exec executable="mysql" input="createdb.sql"&gt;
              &lt;arg line="${mysql.params}" /&gt;
          &lt;/exec&gt;
      &lt;/target&gt;
  
      &lt;target name="insertdb"&gt;
          &lt;exec executable="mysql" input="insertdb.sql"&gt;
              &lt;arg line="${mysql.params}" /&gt;
          &lt;/exec&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>