mysql -uroot create database db_test; use db_test create table tb_test(id int,name varchar(256)); insert into tb_test(id,name) values(1,"aaa"); insert into tb_test(id,name) values(2,"bbb"); insert into tb_test(id,name) values(3,"ccc"); exit #include <stdio.h> #include <stdlib.h> #include <string.h> #include <mysql/mysql.h> int main(void){ MYSQL *conn = NULL; MYSQL_RES *resp = NULL; MYSQL_ROW row;