If you are interested in building MySQL from a source distribution using build options the same as or similar to those use by Oracle to produce binary distributions on your platform, obtain a binary distribution, unpack it, and look in the docs/INFO_BIN file, which contains information about how that MySQL distribution was configured and compiled.
$ ./configure --prefix=/code/mecab --with-pic && make && make install
复制代码
执行MySQL编译
创建bld目录
$ cd /code/mysql-5.7.21
$ mkdir bld
$ cd bld
复制代码
确认cmake选项并执行cmake
注意! MySQL 5.7.21在执行cmake时,部分选项如果在cmake命令中已指定,则最终编译完毕后生成的INFO_BIN会缺少此选项。与官方release包中的INFO_BIN文件进行对比时,会出现不一致。已知的选项有“-DWITH_LZ4=bundled”和“-DWITH_EDITLINE=bundled”,需要从cmake命令中剔除