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

MySQL´æ´¢ÒýÇæ Ó¦ÓÃ


MySQL·þÎñÆ÷²ÉÓÃÁËÄ£¿é»¯·ç¸ñ£¬¸÷²¿·ÖÖ®¼ä±£³ÖÏà¶Ô¶ÀÁ¢£¬ÓÈÆäÌåÏÖÔÚ´æ´¢¼Ü¹¹ÉÏ¡£´æ´¢ÒýÇ渺Ôð
¹ÜÀíÊý¾Ý´æ´¢£¬ÒÔ¼°MySQLµÄË÷Òý¹ÜÀí¡£Í¨¹ý¶¨ÒåµÄAPI£¬MySQL·þÎñÆ÷Äܹ»Óë´æ´¢ÒýÇæ½øÐÐͨÐÅ¡£Ä¿Ç°Ê¹ÓÃ×î¶àµÄÊÇMyISAMºÍInnoDB¡£
InnoDB±»OracleÊÕ¹ººó£¬MySQL×ÔÐпª·¢µÄд洢ÒýÇæFalcon½«ÔÚMySQL6.0°æ±¾Òý½ø¡£
MyISAMÒýÇæÊÇÒ»ÖÖ·ÇÊÂÎñÐÔµÄÒýÇ棬Ìṩ¸ßËÙ´æ´¢ºÍ¼ìË÷£¬ÒÔ¼°È«ÎÄËÑË÷ÄÜÁ¦£¬ÊʺÏÊý¾Ý²Ö¿âµÈ²éѯƵ·±µÄÓ¦Óá£MyISAMÖУ¬Ò»¸ötableʵ¼Ê±£´æΪÈý¸öÎļþ£¬.frm´æ´¢±í¶¨Ò壬.MYD´æ´¢Êý¾Ý,.MYI´æ´¢Ë÷Òý¡£
InnoDB
ÔòÊÇÒ»ÖÖÖ§³ÖÊÂÎñµÄÒýÇæ¡£ËùÒÔµÄÊý¾Ý´æ´¢ÔÚÒ»¸ö»òÕ߶à¸öÊý¾ÝÎļþÖУ¬Ö§³ÖÀàËÆÓÚOracleµÄËø»úÖÆ¡£Ò»°ãÔÚOLTPÓ¦ÓÃÖÐʹÓýϹ㷺¡£Èç¹ûûÓÐÖ¸¶¨
InnoDBÅäÖÃÑ¡ÏMySQL½«ÔÚMySQLÊý¾ÝĿ¼Ï´´½¨Ò»¸öÃûΪibdata1µÄ×Ô¶¯À©Õ¹Êý¾ÝÎļþ£¬ÒÔ¼°Á½¸öÃûΪib_logfile0ºÍ
ib_logfile1µÄÈÕÖ¾Îļþ¡£
´´½¨tableʱ¿ÉÒÔͨ¹ýengine¹Ø¼ü×ÖÖ¸¶¨Ê¹ÓõĴ洢ÒýÇ棬Èç¹ûÊ¡ÂÔÔòʹÓÃϵͳĬÈϵĴ洢ÒýÇ棺
CREATE TABLE t (i INT) ENGINE = MYISAM;
²é¿´ÏµÍ³ÖÐÖ§³ÖµÄ´æ´¢ÒýÇæÀàÐÍ£º
mysql> show engines;
+------------+---------+----------------------------------------------------------------+
| Engine     | Support | Comment                                                        |
+------------+---------+----------------------------------------------------------------+
| MyISAM     | YES     | Default engine as of MySQL 3.23 with great performance         |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      |
| InnoDB     | DEFAULT | Supports transactions, row-level locking, and foreign keys     |
| BerkeleyDB | NO      | Supports transactions and page-level locking                   |
| BLACKHOLE  | NO      | /dev/null storage engine (anything you wr


Ïà¹ØÎĵµ£º

mysql ÊÂÎñ´¦Àí


¹ØÓÚMySQLÊÂÎñ´¦Àíѧϰ¼Ç

START TRANSACTION, COMMITºÍROLLBACKÓï·¨
START TRANSACTION | BEGIN [WORK]
COMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
ROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
SET AUTOCOMMIT = {0 | 1}
START
TRANSACTION»òBEGINÓï¾ä¿ÉÒÔ¿ªÊ¼Ò»ÏîеÄÊÂÎñ¡£COMMIT¿ÉÒÔÌá½»µ±Ç°ÊÂÎñ ......

2010.01.14 (mysql: data too long for column)

netbeans6.7ÖÐÏòmysql5ÖвåÈëÖÐÎÄÊý¾ÝʱÏÔʾ”data too long for column“µÄÎÊÌâ¡£
    ÎÒµÄmysqlÖÐ×Ö·ûµÄÉèÖÃʱutf-8£¬²¢ÇÒÔÚ¿ØÖÆ̨ÖпÉÒÔ²åÈëÖÐÎÄÊý¾Ý²¢ÏÔʾ£¬µ«ÔÚnetbeansÖвåÈëÊý¾Ýʱȴ×ÜÊÇÏÔʾ”data too long for column“¡£»ù±¾¿ÉÒÔÅжÏÊÇÓÉÓÚnetbeansºÍmysqlÖ®¼äµÄÊý¾Ý½»»»³öÁ ......

½â¾öMySQL²»ÔÊÐí´ÓÔ¶³Ì·ÃÎʵķ½·¨

1¡£ ¸Ä±í·¨¡£¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
mysql -u root -p   
mysql>use mysql;   
mysql>update user set& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ