Mysql innodb Îóɾ³ýÊý¾Ý¿âÊÇ·ñ¿É»Ö¸´
¿ÉÒÔ£¬µ«ÊÇÍêÈ«»Ö¸´ËùÓÐµÄ±í²»Ò»¶¨¿ÉÒÔ
¹¤¾ß: innodb-recovery
Official Website: http://code.google.com/p/innodb-tools/
This set of tools could be used to check InnoDB
tablespaces and to recover data from damaged tablespaces or from
dropped/truncated InnoDB tables.
Õâ¸ö¹¤¾ßÓÃÀ´¼ì²éInnoDB¿Õ¼ä±íºÍ»Ö¸´ÓÉÓÚdrop ÒÔ¼°truncateÒý·¢µÄË𻵿ռä±íµÄÊý¾Ý¿âÃÅ
´Ë¹¤¾ßʹÓÃÐèÒª°²×°PerlµÄһЩ²å¼þ£¬ÓÐ:
DBI
Mysql::DBD
»Ö¸´Ç°Ìá,ÌáÁËÒÔÉϵIJå¼þÍ⣬Èç¹ûÔÚʹÓÃʱÓб¨ÉÙ²å¼þ£¬ÔòÐèÒªÕÒµ½ÉٵIJå¼þ£¬ÔÙ°²×°
ÁíÍâ, »Ö¸´Êý¾ÝµÄÇ°ÌáÊÇ£¬Êý¾Ý¿âʹÓõÄÊÇinnodbÒýÇ棬µ±ÓÃ'DROP DATABASE DBNAME'ºó£¬Ã»ÓÐÔÙ×öÆäËü²Ù×÷£¬±£Ö¤ibdata1ÎļþµÄÍêÕûÐÔ¼°²»±»ºóÐøдÊý¾ÝÆÆ»µ
Ö´Ðлָ´µÄ¹ý³ÌÖУ¬ÓÐÒ»²½ÊÇÐèҪעÒâµÄ£¬¾ÍÊÇ"Recovery steps: Preparing the code for recovery"
ĬÈÏÉú³ÉµÄ±í½á¹¹ÖеÄһЩÁÐÊôÐԵĸñʽÊDz»¾«È·µÄ£¬ÄãÐèÒª¾«È·ÕâЩÊôÐÔ£¬»Ö¸´µÄ¸ÅÂʲŻáÌá¸ß
######################
Note that this is a translation of the table format into what InnoDB Tools use internally as a C program.
You may need to edit this file later on, to force some constraints on the recovered data.
#####################
µ±Äã°´ÕÕ http://code.google.com/p/innodb-tools/wiki/InnodbRecoverySteps ÀïµÄ²½Öè²Ù×÷Í꣬²¢»Ö¸´Êý¾Ýºó£¬
ÏàÐÅ£¬ ÄãÒÔºóÔÙÒ²²»»á·¶ÀàËƵĴíÎóÁË,ÒòΪÕâ¸ö¹ý³ÌÊÇÂù³¤µÄ£¬µ±È»£¬Ç°ÌáÊÇÄãµÄÊý¾Ý±í¶àÒÔ¼°Êý¾ÝÁ¿´ó¡£
Ïà¹ØÎĵµ£º
#!/usr/bin/perl
use Mysql;
print "Content-type:
text/html \n\n";
# MySQL
ÅäÖñäÁ¿
$host = "localhost";
$database
= "testdb";
$tablename = "testtable";
$user = "username";
$pw =
"password";
# PERL MYSQL CONNECT()
$connect = ......
ÔÚApache, PHP, MySQLµÄÌåϵ¼Ü¹¹ÖУ¬MySQL¶ÔÓÚÐÔÄܵÄÓ°Ïì×î´ó£¬Ò²ÊǹؼüµÄºËÐIJ¿·Ö¡£¶ÔÓÚDiscuz!ÂÛ̳³ÌÐòÒ²ÊÇÈç´Ë£¬MySQLµÄÉèÖÃÊÇ·ñºÏÀíÓÅ»¯£¬Ö±½ÓÓ°Ïìµ½ÂÛ̳µÄËٶȺͳÐÔØÁ¿£¡Í¬Ê±£¬MySQLÒ²ÊÇÓÅ»¯ÄѶÈ×î´óµÄÒ»¸ö²¿·Ö£¬²»µ«ÐèÒªÀí½âһЩMySQLרҵ֪ʶ£¬Í¬Ê±»¹ÐèÒª³¤Ê±¼äµÄ¹Û²ìͳ¼Æ²¢ÇÒ¸ù¾Ý¾Ñé½øÐÐÅжϣ¬È»ºóÉèÖúÏÀíµÄ²ÎÊý¡ ......
SELECT --´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
INSERT --ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
DELETE --´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
UPDATE --¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå
CREATE TABLE --´´½¨Ò»¸öÊý¾Ý¿â±í
DROP TABLE --´ÓÊý¾Ý¿âÖÐɾ³ý±í
ALTER TABLE --ÐÞ¸ÄÊý¾Ý¿â±í½á¹¹
CREATE VIEW --´´½¨Ò»¸öÊÓͼ
DROP VIEW --´ÓÊý¾Ý¿âÖÐɾ³ýÊÓͼ ......
MySQL³£ÓòÙ×÷»ù±¾²Ù×÷£¬ÒÔ϶¼ÊÇMySQL5.0ϲâÊÔͨ¹ýÊ×ÏÈ˵Ã÷Ï£¬¼ÇסÔÚÿ¸öÃüÁî½áÊøʱ¼ÓÉÏ£»£¨·ÖºÅ£©
1.µ¼³öÕû¸öÊý¾Ý¿â
mysqldump -u Óû§Ãû -p --default-character-set=latin1 Êý¾Ý¿âÃû > µ¼³öµÄÎļþÃû(Êý¾Ý¿âĬÈϱàÂëÊÇlatin1)
mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql
2.µ¼³öÒ»¸ö±í
mysqldump -u Ó ......
MySQL Reference Manual for version 4.1.0-alpha.
¡¡ÒëÕßÐò
¡¡ÁÐÀàÐÍÓ뺯ÊýË÷Òý
6 MySQL ÓïÑԲο¼
6.1 ÓïÑԽṹ
6.1.1 ÎÄ×Ö£ºÔõôд×Ö·û´®ÓëÊý×Ö
6.1.1.1 ×Ö·û´®
6.1.1.2 Êý×Ö
6.1.1.3 Ê®Áù½øÖÆÖµ
......