ת£ºLinuxϽøÐÐMYSQLµÄC++±à³ÌÆð²½ÊÖ¼Ç
LinuxϽøÐÐMYSQLµÄC++±à³ÌÆð²½ÊÖ¼Ç
Ê×ÏȰ²×°±ØÐèµÄ¿ª·¢°ü
sudo apt-get install gcc g++ libgcc1 libg++ make gdb
°²×°MYSQLµÄCÓïÑÔ¿ª·¢°ü
sudo apt-get install libmysql++-dev libmysql++2c2a libmysqlclient15-dev libmysqlclient15off
°ÑlibÎļþ¿½±´µ½¹«ÓÃ
sudo cp /usr/lib/mysql/* /usr/lib/
½¨Á¢Ò»¸öÐÂÎļþtest.cpp
nano test.cpp
ÊäÈëÄÚÈÝ
#include <stdio.h>
#include <stdlib.h>
#include "/usr/include/mysql/mysql.h"
int main() {
MYSQL mysql;
mysql_init(&mysql);
}
ctrl+O±£´æctrl+xÍ˳ö¡£
È»ºó±àÒë
g++ -lmysqlclient test.cpp -o test
ÔËÐÐ
./test
Èç¹ûʲô¶¼Ã»Ìáʾ£¬Ã»´íÎ󣬾Í˵Ã÷³É¹¦ÁË¡£
¾ÍÊÇÕâÑù¡£¶÷¡£»¹ÊÇÂú¡£¡£¡£¼òµ¥µÄ˵¡£
Ïà¹ØÎĵµ£º
»ù´¡²¿·Ö
Ò»¡¢MySQL »ñµÃµ±Ç°ÈÕÆÚʱ¼ä º¯Êý
1.1 »ñµÃµ±Ç°ÈÕÆÚ+ʱ¼ä£¨date + time£©º¯Êý£ºnow()
mysql> select now();
+---------------------+
| now() |
+----------------- ......
http://www.blogjava.net/Alpha/archive/2007/07/23/131912.html
//Ö÷¼ü549830479
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
//Ôö¼ÓÒ»¸öÐÂÁÐ549830479
alter table t2 add d timestamp;
alter table infos add ex tinyint n ......
1. °²×°helix server.
InstallRoot: /etc/httpd/rtsp
administrator account : yanweicheng/1
rtsp¶Ë¿ÚºÅ 554, http port: 8080, mms: 1755, Administrator request: 14525
2 Æô¶¯
cd $InstallRoot/Bin
&nb ......
LinuxÄں˵÷ÊÔ
1 printk
[1] ʹÓ÷¶Î§
³ýÔÚϵͳÆô¶¯¹ý³ÌÖÐ,ÖÕ¶Ëδ³õʼ»¯Ö®Ç°, ÆäËûÈκÎʱºò,Èκεط½¶¼¿ÉÒÔµ÷ÓÃËü.
[2] ¼Ç¼µÈ¼¶
KERN_EMERG, KERN_ALERT, KERN_CRIT, KERN_ERR, KERN_WARNING, KERN_NOTICE, KERN_INFO, KERN_DEBUG.
Èô²»Ö¸¶¨¼Ç¼µÈ¼¶,º¯Êý»áÑ ......