在Ubuntu下费了好长时间终于让C操作MySQL成功了,在此把方法记下来,留着以后用。先安装MySQL 代码: sudo apt-get install mysql-server mysql-client