Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

MySQLѧϰ

C APIÏà¹Ø
C APIÊý¾ÝÀàÐÍ
 MYSQL
¸Ã½á¹¹´ú±í1¸öÊý¾Ý¿âÁ¬½ÓµÄ¾ä±ú¡£¼¸ºõËùÓеÄMySQLº¯Êý¾ùʹÓÃËü¡£²»Ó¦³¢ÊÔ¿½±´MYSQL½á¹¹¡£²»±£Ö¤ÕâÀ࿽±´½á¹û»áÓÐÓá£
 MYSQL_RES
¸Ã½á¹¹´ú±í·µ»ØÐеIJéѯ½á¹û£¨SELECT, SHOW, DESCRIBE, EXPLAIN£©¡£ÔÚ±¾½ÚµÄÊ£Óಿ·Ö£¬½«²éѯ·µ»ØµÄÐÅÏ¢³ÆΪ“½á¹û¼¯”¡£
 MYSQL_ROW
ÕâÊÇ1ÐÐÊý¾ÝµÄ“ÀàÐÍ°²È«”±íʾ¡£ËüÄ¿Ç°ÊÇ°´ÕÕ¼ÆÊý×Ö½Ú×Ö·û´®µÄÊý×éʵʩµÄ¡££¨Èç¹û×Ö¶ÎÖµ¿ÉÄÜ°üº¬¶þ½øÖÆÊý¾Ý£¬²»Äܽ«Æäµ±×÷ÓÉNullÖÕ½áµÄ×Ö·û´®¶Ô´ý£¬ÕâÊÇÒòΪÕâÀàÖµ¿ÉÄÜ»á°üº¬Null×Ö½Ú£©¡£ÐÐÊÇͨ¹ýµ÷ÓÃmysql_fetch_row()»ñµÃµÄ¡£
 MYSQL_FIELD
¸Ã½á¹¹°üº¬¹ØÓÚ×ֶεÄÐÅÏ¢£¬Èç×Ö¶ÎÃû¡¢ÀàÐͺʹóС¡£ÕâÀïÏêϸ½éÉÜÁËÆä³ÉÔ±¡£Í¨¹ýÖظ´µ÷ÓÃmysql_fetch_field()£¬¿ÉΪÿ¸ö×ֶλñµÃMYSQL_FIELD½á¹¹¡£×Ö¶ÎÖµ²»ÊǸýṹµÄ×é³É²¿·Ý£¬ËüÃÇ°üº¬ÔÚMYSQL_ROW½á¹¹ÖС£
 MYSQL_FIELD_OFFSET
ÕâÊÇMySQL×Ö¶ÎÁбíÆ«ÒÆÁ¿µÄ“ÀàÐÍ°²È«”±íʾ£¨ÓÉmysql_field_seek()ʹÓã©¡£Æ«ÒÆÁ¿ÊÇÐÐÄÚµÄ×ֶαàºÅ£¬´Ó0¿ªÊ¼¡£
 my_ulonglong
ÓÃÓÚÐÐÊýÒÔ¼°mysql_affected_rows()¡¢mysql_num_rows()ºÍmysql_insert_id()µÄÀàÐÍ¡£¸ÃÀàÐÍÌṩµÄ·¶Î§Îª0¡«1.84e19¡£
ÔÚijЩϵͳÉÏ£¬²»ÄÜ´òÓ¡ÀàÐÍmy_ulonglongµÄÖµ¡£ÒªÏë´òÓ¡ÕâÀàÖµ£¬Ç뽫Æäת»»ÎªÎÞ·ûºÅ³¤ÕûÊýÀàÐͲ¢Ê¹ÓÃ%lu´òÓ¡¸ñʽ£¬ÀýÈ磺
printf ("Number of rows: %lu\n", (unsigned long) mysql_num_rows(result));


Ïà¹ØÎĵµ£º

ÔÚC#.net³ÌÐòÖÐʹÓÃMYSQLÊý¾Ý¿â

ÏÂÃæÊÇcommond:
MySQLCommand cmd;
cmd = new MySQLDriverCS.MySQLCommand("DROP TABLE IF EXISTS test.mysqldrivercs_test",conn);
cmd.ExecuteNonQuery();
cmd.Dispose();
ÏÂÃæÊÇinsert:
string Value = "Value";
int SettingID = 1;
new MySQLInsertCommand(conn,
new object[,] {{"SettingID",SettingID},{"S ......

mysql×Ö·û¼¯²é¿´ÒÔ¼°ÐÞ¸Ä

ת×Ô:http://blog.chinaunix.net/u2/85344/showart_2042280.html
LiunxÏÂÐÞ¸ÄMySQL×Ö·û¼¯£º
1.²éÕÒMySQLµÄcnfÎļþµÄλÖÃ
find / -iname '*.cnf' -print

/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-large.cnf
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql ......

MySQLµÄ°²×°£¨Ãâ°²×°°æ±¾£©

Ò»¡¢ÏÂÔØMySQL
¹Ù·½ÍøÕ¾£ºwww.mysql.org
¶þ¡¢°²×°
1.½«´ËѹËõ°ü½âѹËõµ½Öƶ¨Îļþ¼ÐÏ£¬ÒÔ"C:/mysql"ΪÀý
2.½«my-midium.ini¸´ÖÆÒ»·Ý£¬²¢ÖØÃüÃûΪmy.ini
3.½«C:/mysql/bin/libmysql.dll¸´ÖƵ½ÏµÍ³Ä¿Â¼Ï£¬ÀýÈ縴ÖƵ½"C:/windows"ÏÂ
4.ÔÚÃüÁîÐÐģʽÏ£¬ÔËÐÐC:/mysql/bin/mysqld£¬¼´¿É¿ªÆôMySQL·þÎñ ......

MysqlÖÐÕÒ²»µ½.mydÎļþµÄÎÊÌâ

WordpressÓÃÁËÕâô³¤Ê±¼ä£¬Å¼¶û»áÏëÆðÀ´±¸·ÝÏÂÊý¾Ý£¬ÉÏ´ÎÊÇÓÃwpµÄxml£¬Õâ´Î°Ñ×Ô¼º»úÆ÷µÄ»·¾³ÅäµÄ¸úÖ÷»úÌṩÉÌ»ù±¾Ò»ÑùÁË£¬ÕýºÃÄDZßÓÐmysqlÊý¾Ý¿â´ò°ü±¸·ÝµÄ·þÎñ£¬¾Í³¢ÊÔÁËһϡ£¿É²»¹ÜÎÒÏÂÔØÄĸöʱ¼äµãµÄ±¸·Ý°ü£¬ÀïÃ涼ֻÓÐwp±íµÄ10¸öfrmÎļþ£¬copyµ½ÎÒµÄÊý¾Ý¿âĿ¼ºó·ÃÎÊweb£¬Ã»ÓÐÈκÎÊý¾Ý£¡Ö±½Ó¸ã²»¶®ÁË¡£ÒÔÇ°¾õµÃÓÃmysql ......

mysql load data infile

ÈçºÎÌá¸ßmysql load
data
infile
µÄËÙ¶È
²âÊÔÊý¾Ý2.5G£¬¹²ÓÐÊý¾Ý9427567Ìõ¡£ÓõÄmysqlµÄlarge·þÎñÆ÷µÄÅäÖá£
load
Ò»´ÎÐèÒª´ó¸Å10·ÖÖÓ×óÓÒ¡£
½¨µÄ±íÓõÄÊÇMYISAM£¬µ÷ÕûÁ˼¸¸ösessionµÄ²ÎÊýÖµ
SET SESSION BULK_INSERT_BUFFER_SIZE=256217728;
SET SESSION MYISAM_SORT_BUFFER_SIZE=256217728;
ÔËÐнá¹ûÈçÏÂ
Qu ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ