MysqlÍâ¼üÔ¼Êø
1.myisam±í²»Ö§³ÖÍâ¼ü£¬innodb²ÅÖ§³ÖÍâ¼ü
2.mysqlÍâ¼üµÄÁÐÀàÐͺÍÖ÷±íÖÐÏàÓ¦µÄÖ÷¼üÁÐÀàÐͱØÐëÒ»Ö£¬¼´ÀàÐÍÒ»Ö¡¢³¤¶ÈÒ»Ö£¬·ñÔò»á±¨´í¡£ERROR 1005: Can't create table (errno: 150)
3.ÔÚÒ»¸öÊý¾Ý¿âÖÐÍâ¼üÃû×Ö²»ÄÜÖظ´£¬·ñÔò»á±¨ERROR 1005: Can't create table 'XXXXXX' (errno: 121)
Ïà¹ØÎĵµ£º
MySQL ClusterÅäÖÃstep by step
À´Ô´£ºhttp://space.itpub.net/15415488/viewspace-620903
¹«Ë¾ÓиöÏîÄ¿ÊDzâÊÔdistributed DB£¬ÆäÖÐÒ»ÏîÊÇÕë¶ÔMySQL ClusterµÄ²âÊÔ¡£
ÓÚÊÇ»¨ÁËÁ½Ììʱ¼ä×°»úÆ÷ºÍÅäÖÃMySQL Cluster¡£Õû¸ö¹ý³Ì»¹ÊDZȽÏ˳ÀûµÄ£¬µ±È»Èç¹û¶ÔMySQL³£ÓÃÃüÁî±È½ÏÊìϤµÄ»°»á¸ü˳Àû¡£
ÁôÏÂstep by stepÅä ......
create database sample;
create table 't_user' (
'id' int(11) not null auto_increment,
'name' varchar(100) not null default '',
primary key ('id')
) type=myisam;
Ñ¡ÏîÖ»ÔÚMySQL 3.23ºÍÒÔºó°æ±¾Öб»ÊµÏÖ¡£
²»Í¬µÄ±íÀàÐÍÊÇ£º
ISAM ÔÀ´µÄ±í´¦ÀíÆ ......
´´½¨Êý¾Ý¿â£º
mysql>create database test;
Query OK, 1 row affected (0.02 sec)
´´½¨Êý¾Ý¿â±í£º
mysql>use test;
Database changed
´´½¨Êý¾Ý¿â±í£º
myaql>create table user(SID VARCHAR(11), name VARCHAT(6) );
Query OK, 0 rows affected (0.08 sec)
²åÈë¼Ç¼£º
mysql>insert int use ......
¶ÔmysqlµÄÓÅ»¯²»ÔÚÐУ¬¸ã¹ý¼¸´ÎÓÅ»¯£¬µ«ÊǶ¼²»ÊǺÜÀíÏ룬»¹ÊÇÀË·Ñ×ÊÔ´Ì«¶à¡£Ò»Ö±·¢ÏÖÎÒµÄmysqlµÄ»º´æÃüÖÐÂʼ«²î£¬Çé¿öÁ¼ºÃµÄʱºòµ½´ï¹ý60-70%£¬µ«ÊÇÔËÐÐʱ¼äÒ»³¤£¬Ö»ÓÐ10-20%¡£²éÁËһЩ×ÊÁÏ£¬¹ØÓÚ»º´æµÄһЩ²ÎÊý¼Ç¼
mysql> SHOW VARIABLES LIKE ‘%query_cache%’;
+—————&m ......
ÔÀí
QueryCache(ÏÂÃæ¼ò³ÆQC)ÊǸù¾ÝSQLÓï¾äÀ´cacheµÄ¡£Ò»¸öSQL²éѯÈç¹ûÒÔselect¿ªÍ·£¬ÄÇôMySQL·þÎñÆ÷½«³¢ÊÔ¶ÔÆäʹÓÃ
QC¡£Ã¿¸öCache¶¼ÊÇÒÔSQLÎı¾×÷ΪkeyÀ´´æµÄ¡£ÔÚÓ¦ÓÃQC֮ǰ£¬SQLÎı¾²»»á±»×÷Èκδ¦Àí¡£Ò²¾ÍÊÇ˵£¬Á½¸öSQLÓï¾ä£¬Ö»ÒªÏà²îÄÄÅÂÊÇÒ»¸ö×Ö·û£¨ÀýÈç´óСд²»Ò»Ñù£»¶àÒ»¸ö¿Õ¸ñµÈ£©£¬ÄÇôÕâÁ½¸öSQL½«Ê¹Óò»Í¬µÄÒ» ......