1.安装mysql devel devel 安装mysql-community-devel 这里可能会有很多依赖问题,可以用7.2的镜像解决 2.编译 在头文件中加入 #include <mysql.h>