mysql ibdata1ÎļþµÄËõС
mysql ibdata1ÎļþµÄËõС(2009-12-22 15:29:46)
±êÇ©£ºit
mysql ibdata1´æ·ÅÊý¾Ý£¬Ë÷ÒýµÈ£¬ÊÇMYSQLµÄ×îÖ÷ÒªµÄÊý¾Ý¡£
Èç¹û²»°ÑÊý¾Ý·Ö¿ª´æ·ÅµÄ»°£¬Õâ¸öÎļþµÄ´óСºÜÈÝÒ×¾ÍÉÏÁËG£¬ÉõÖÁ10+G¡£¶ÔÓÚijЩӦÓÃÀ´Ëµ£¬²¢²»ÊÇÌ«ºÏÊÊ¡£Òò´ËÒª°Ñ´ËÎļþËõС¡£
·½·¨£ºÊý¾ÝÎļþµ¥¶À´æ·Å¡£
²½Ö裺
1£¬±¸·ÝÊý¾Ý¿â
´ÓÃüÁîÐнøÈëMySQL Server 5.0\bin
±¸·ÝÈ«²¿Êý¾Ý¿â£¬Ö´ÐÐÃüÁîmysqldump -q -uusername -pyourpassword --add-drop-table -all-databases > /all.sql
×öÍê´Ë²½ºó£¬Í£Ö¹Êý¾Ý¿â·þÎñ¡£
2£¬ÐÞ¸ÄmysqlÅäÖÃÎļþ
ÐÞ¸Ämy.iniÎļþ£¬Ôö¼ÓÏÂÃæÅäÖÃ
innodb_file_per_table
¶ÔÿÕűíʹÓõ¥¶ÀµÄinnoDBÎļþ, ÐÞ¸Ä/etc/my.cnfÎļþ
3£¬É¾³ýÔÊý¾ÝÎļþ
ɾ³ýÔÀ´µÄibdata1Îļþ¼°ÈÕÖ¾Îļþib_logfile*£¬É¾³ýdataĿ¼ÏµÄÓ¦ÓÃÊý¾Ý¿âÎļþ¼Ð(mysqlÎļþ¼Ð²»ÒªÉ¾)
4£¬»¹ÔÊý¾Ý¿â
Æô¶¯Êý¾Ý¿â·þÎñ
´ÓÃüÁîÐнøÈëMySQL Server 5.0\bin
»¹ÔÈ«²¿Êý¾Ý¿â£¬Ö´ÐÐÃüÁîmysql -uusername -pyourpassword < /all.sql
¾¹ýÒÔÉϼ¸²½ºó£¬¿ÉÒÔ¿´µ½ÐµÄibdata1Îļþ¾ÍÖ»Óм¸Ê®MÁË£¬Êý¾Ý¼°Ë÷Òý¶¼±ä³ÉÁËÕë¶Ôµ¥¸ö±íµÄСibdÎļþÁË£¬ËüÃÇÔÚÏàÓ¦Êý¾Ý¿âµÄÎļþ¼ÐÏÂÃæ¡£
Ïà¹ØÎĵµ£º
InnoDB¸ÅÊö
InnoDB¸øMySQLÌṩÁ˾ßÓÐÌá½»£¬»Ø¹öºÍ±ÀÀ£»Ö¸´ÄÜÁ¦µÄÊÂÎñ°²È«£¨ACID¼æÈÝ£©´æ´¢ÒýÇæ¡£InnoDBËø¶¨ÔÚÐм¶²¢ÇÒÒ²ÔÚSELECTÓï¾äÌṩһ¸öOracle·ç¸ñÒ»ÖµķÇËø¶¨¶Á¡£ÕâЩÌØÉ«Ôö¼ÓÁ˶àÓû§²¿ÊðºÍÐÔÄÜ¡£Ã»ÓÐÔÚInnoDBÖÐÀ©´óËø¶¨µÄÐèÒª£¬ÒòΪÔÚInnoDBÖÐÐм¶Ëø¶¨ÊʺϷdz£Ð¡µÄ¿Õ¼ä¡£InnoDBÒ²Ö§³ÖFOREIGN KEYÇ¿ÖÆ¡£ÔÚSQL²éÑ¯Ö ......
1)¡¢È¥sunµÄ¹ÙÍøÏÂÔØÒ»¸ömysqlµÄѹËõ°ü£¬ÎÒÏÂÔصÄÊÇmysql-noinstall-5.5.0-m2-win32.zip¡£
2)¡¢°ÑÉÏÃæÏÂÔصÄѹËõ°ü½âѹµ½£ºD:\Program Files\mysqlÏÂÃæ¡£
3)¡¢ÔÚ D:\Program Files\mysql\ ÖÐÕÒ my-large.ini °ÑËü¸´ÖÆ³É my.ini¡£
4)¡¢ÔÚ my.ini ÖÐÕÒ [mysqld] £¬Ìí ......
(1)µÇ½µ½mysql
C:\Documents and Settings\Administrator>mysql -h localhost -u root -p
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 69
Server version: 5.0.51a-community-nt MySQL Community Edition (GPL)
Type 'help;' or '\h' fo ......
mysqlÖÐchar¡¢varchar¡¢nvarcharÊý¾ÝÀàÐ͵ÄÓ÷¨Çø±ð:
˵Ã÷:
1¡¢char:
¹Ì¶¨³¤¶ÈµÄ·Ç Unicode ×Ö·ûÊý¾Ý£¬×î´ó³¤¶ÈΪ 8,000 ¸ö×Ö·û¡£
2¡¢varchar£º
¿É±ä³¤¶ÈµÄ·Ç Unicode Êý¾Ý£¬×Ϊ 8,000 ¸ö×Ö·û¡£
3¡¢nvarchar£º
¿É±ä³¤¶È Unicode Êý¾Ý£¬Æä×î´ó³¤¶ÈΪ 4,000 ×Ö·û¡£  ......
mysql·þÎñÆ÷°²×°ÅäÖãº
1. sudp apt-get install mysql-server-5.0
2. ´´½¨¿âsecond_proxy, ΪsecProxyÌí¼ÓÓû§£ºgrant all privileges on second_proxy.* to secProxy@'%' identified by 'passwd';
3. ÉèÖÃmysql.user±íÈçÏ£º
+-----------+------------------+-------------------------------------------+
| Host& ......