mysql Êý¾Ý´æ´¢×ܽá
ÓÉÓÚ×î½üÒ»Ö±ÔÚÁ˽âmysql¡£¸÷ÖÖ±íÀàÐ͵ÄÊý¾Ý´æ´¢ÒÔ¼°Ïà¹ØÏÞÖƾÍÊDZØÐëÁ˽âµÄ·½ÃæÁË¡£
×Ô¼ºµÄ·þÎñÆ÷»·¾³£ºOS Cent OS ext3£¬memory 4G£¬ disk 2T block size 4K¡£
¾µ÷²é£¬linuxÏÂÎļþ×î´óÊÇ´æÔÚÏÞÖƵġ£È¥googleÉÏËÑÁËËÑ£¬´ó¼Ò˵·¨²»Ò»£¬×îÖÕ×Ô¼º»¹ÊÇÕÒµ½±È½Ï¹Ù·½µÄ˵¡£Ïê¼ûhttp://en.wikipedia.org/wiki/Ext3 ËùÒÔ×Ô¼ºµÄ·þÎñÆ÷×î´óÎļþÏÞÖÆΪ2T¡£
Õâµã¸ãÇå³þºó£¬ÔÚÊý¾Ý¿â²¿ÊðÉè¼ÆÉϾ͵ÿ¼Âǵ½Õâµã¡£
¼òµ¥ËµÒ»ÏÂ×Ô¼ºµÄÊý¾Ý¿â¼Ü¹¹£¬ÊDzÉÓñȽÏͨÓúͳÉÊìµÄ×ö·¨£¬¼´£º2¸ömaster£¬Ö®¼ä´æÔÚHA£»N¸öslaves£¬¸ºÔØ·Öµ£¶ÁµÄ¸ºÔØ¡£masterºÍslaves²ÉÓÃreplicationÒ첽ͬ²½¡£masterÉϵÄÊý¾Ý¿â±íÀàÐÍΪinnodb£¬¸ÃÀàÐÍÓÐÊÂÎïµÄ¸ÅÄ²¢ÇÒÊʺÏƵ·±¶Áд¡£slavesÊý¾Ý¿â²ÉÓÃmyisam±íÀàÐÍ£¬¿ÉÒÔ¸üºÃµÄ´¦Àí¶ÁÇëÇó¡£ËùÒÔÔÚ´ËÌÖÂÛÕâÁ½ÖÖÀàÐÍÊý¾ÝµÄ´æ´¢ÐÎʽ¡£
innodbĬÈϵÄÊǹ²Ïí±í¿Õ¼äµÄ£¬ÕâµãÔÚmysql¹Ù·½ÍøÕ¾ÎĵµÉÏÓкÜÃ÷È·µÄ˵Ã÷¡£ÎҾͲ»·Ñ»°ÁË¡£Èç¹û²ÉÓù²Ïí±í¿Õ¼ä£¬¿ÉÒÔÅäÖöà¸öÊý¾ÝÎļþµ½²»Í¬µÄ´ÅÅÌ£¬À´½â¾öÊý¾Ý´æ´¢Æ¿¾±¡£µ«ÊÇ×Ô¼ºÊ¼ÖÕ¾õµÃ£¬´óÎļþ²¢²»Ì«ÀûÓÚά»¤£¬ÀïÊý¾ÝÒƶ¯µÈ¡£ËùÒÔ»¹¿ÉÒÔ²ÉÓÃper-table±í¿Õ¼ä£¬µ«ÊÇÎÊÌâÓÖ¾ÍÀ´ÁË£¬Ã¿¸ö±íµÄÊý¾ÝºÃÏñÖ»ÄÜ´æ´¢µ½mysqlÅäÖõÄÊý¾ÝĿ¼ÄÚ¡£Õâµã×Ô¼ºÃ»ÓÐÕÒµ½ºÏÊʵĽâ¾ö·½°¸¡£
myisam±íÀàÐÍ£¬ËüµÄindex±íºÍdata±í¶¼ÊÇ¿ÉÒÔÔÚcreate tableµÄʱºòÖ¸¶¨Â·¾¶µÄ¡£ËùÒÔÎÒÃÇ¿ÉÒÔÖ¸¶¨µ½²»Í¬µÄ´ÅÅÌÉÏ£¬½â¾öδÀ´µÄÊý¾Ý´æ´¢Æ¿¾±¡£ºÜ¼òµ¥ºÜÇ¿´ó¡£
Ïà¹ØÎĵµ£º
°²裝MySQL-Server
$ sudo apt-get install mysql-server
°²裝Apache HTTP Server
$ sudo apt-get install apache2
°²裝PHP for Apache HTTP Server
$ sudo apt-get install php5
°²裝MySQL for Apache HTTP Server
$ sudo apt-get install libapache2-mod-auth-mysql
$ sudo apt-get ......
write by ¾ÅÌìÑãôá(JTianLing) -- blog.csdn.net/vagrxie ÌÖÂÛÐÂÎÅ×é¼°Îļþ ½ñÌì¿´µ½CSDNÉϵÄÒ»ÔòÐÂÎÅ¡¶Å·ÃËÕýʽ·ñ¾ö¼×¹ÇÎÄÊÕ¹ºSun ¼×¹ÇÎľÝÀíÁ¦Õù¡·ºóÕæÊǸÐ̾°¡¡£¡£¡£¡£ SunÒ²ËãÊÇÊ¢¼«Ò»Ê±µÄ´ó¹«Ë¾ÁË£¬ÒòΪJAVAÓïÑÔ¶øÎÅÃûÓÚÊÀ£¬ºóÀ´¹ÉƱ´úÂ붼¸Ä³ÉJAVAÁË£¬ËäÈ»JAVAʵ¼ÊÉÏûÓÐΪÆä´øÀ´Ì«¶àµÄÀûÈ󣬵«ÊÇSunÒ²ËãÊÇÄܹ»×Ô¼ ......
1 µ¼³ö:
½øÈëÃüÁîÐÐ: Ö´ÐÐ
mysqldump -u username -p password –all-databases > all.sql
Ïêϸ²ÎÊý:
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
2 µ¼Èë
½øÈëmysql -u username -p password
Ö´ÐÐsource all.sql;
......
À´Ô´£º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 ......