?????Linux?1????????
??????????? mount -t iso9660 /dev/cdrom /mnt/cdrom
????ж????? umount /dev/cdrom
???????????? eject
??????????? eject –t
????????????MySQL??譎???
????mysql-server-3.23.54a-11.i386.rpm
????mysql-3.23.54a-11.i386.rpm
????????MySQL???????????????
????mysql-devel-3.23.54a-11.i386.rpm
????????Linux???????????
????rpm –ivh ???????????
????rpm –qa | grep ??????????
????rpm –e ???????????
???????Linux??Mysql??????????
????/etc/rc.d/init.d/mysqld status ???????mysql??????
????service mysqld start ???mysql????
????mysql –u root –p pass ????????root??????pass????mysql?????
?????塢Linux C/C++????MySQL?????
??????????#include
???????????
????gcc -o server server.c –I /usr/include/mysql –L /usr/lib/mysql –l mysqlclient –lz –lm
????????????
????Step 1???????????
????????MYSQL mysql??
????mysql_init??&mysql?????????
????mysql_real_connect??&mysql??“hostname”??“username”??“password”??“database”??0??NULL??0????
????Step 2?????SQL???
????mysql_real_query??&mysql??SQL????
????Step 3???????????
????????MYSQL_RES?? *res??
????res = mysql_store_result??&mysql????
????Step 4??????????????У??????????????
????mysql_fetch_row??res????
????mysql_num_fields??res???? ?????????????
????printf??“%s ”??row[index]????
????Step 5????????
????mysql_free_result??res????
????mysql_close??&mysql????