title: "unable to include mysql.h" in C program
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2516187/how-to-make-include-mysql-h-work">How to make #include &lt;mysql.h&gt; work?</a>  </p>
  </blockquote>
  
  
  
  <p>I need to connect C and mysql</p>
  
  <p>This is my program</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;mysql.h&gt;
  #define host "localhost"
  #define username "root"
  #define password "viswa"
  #define database "dbase"
  MYSQL *conn;
  
  int main()
  {
  
       MYSQL_RES *res_set;
       MYSQL_ROW row;
  
       conn = mysql_init(NULL);
  
      if( conn == NULL )
       {                                               `
          printf("Failed to initate MySQL\n");
          return 1;
      }
  
  
      if( ! mysql_real_connect(conn,host,username,password,database,0,NULL,0) )
      {
          printf( "Error connecting to database: %s\n", mysql_error(conn));
          return 1;
      }
  
      unsigned int i;
  
  
      mysql_query(conn,"SELECT name, email, password FROM users");
  
  
      res_set = mysql_store_result(conn);
  
  
      unsigned int numrows = mysql_num_rows(res_set);
      unsigned int num_fields = mysql_num_fields(res_set);
  
  
  
      while ((row = mysql_fetch_row(res_set)) != NULL)
      {
  
          for(i = 0; i &lt; num_fields; i++)
          {
               printf("%s\t", row[i] ? row[i] : "NULL");
          }
          printf("\n");
  
      }
  
  
      mysql_close(conn);
      return 0;
  
  }
  </code></pre>
  
  <p>I got the error "unable to include mysql.h".</p>
  
  <p>I am using windows 7, Turbo C, mysql and I downloaded mysql-connector-c-noinstall-6.0.2-win32-vs2005, but I don't know how to include it.</p>