title: How to use internal headers of mysql?
body: <p>Recently I'm trying to build a tool to synchronize data between databases using binlog. The way to do this is kind of like, the tool pretends to be a MySQL server and then communicates with a real MySQL server via MySQL C/S protocol. I went to github, and found some tools that Do the same thing, so I started to read their codes.
  The problem is, these tools are using some header files include <code>m_ctype.h</code> <code>sql_common.h</code>.I have <code>libmysqlclient-dev</code> installed, but these headers are not in <code>/usr/local/includ</code>. Basically I want to use <code>simple_command()</code>, which is a macro in these files, to send data packages to the real server.
  Then I found these files are in the source codes of MySQL. So how can I get these headers and make these functions and macros work? Should I :</p>
  
  <ol>
  <li>copy these files to include folder and link to libmysqlclient like mysql_config shows</li>
  <li>install another lib, maybe libmysql or something, and then I will get the headers and make things work</li>
  </ol>
  
  <p>or Do any other things?</p>
  
  <p>If there are other ways to implement MySQL c/s protocol, that will be fine, too.</p>
  
  <hr>
  
  <p>I checked files of libmysqlclient-dev listed on <a href="https://packages.ubuntu.com/bionic/amd64/libmysqlclient-dev/filelist" rel="nofollow noreferrer" title="ubuntu packages">ubuntu package</a>, and I found that the lib I installed following instructions on dev.mysql.com has a lot of headers missing, include <code>my_global.h</code> <code>my_config.h</code> etc. Is this because i'm using MySQL's apt source? Or for some other reasons?</p>