1.termios标准接口 tcflag_t c_i(o,c,l)flag,cc_t c_cc[nccs]
2.终端非标准模式:stty -icanon min 1 time 0
回显:stty -echo
3.数据库连接
初始化
mysql_init(&conn_ptr);
conn_ptr = mysql_real_connect(conn_ptr,"localhost","rick(用户名)","sercet(密码),“foo(数据库名字)”,0,NULL,0);
mysql_query(&conn_ptr,"sql语句");