在线咨询
QQ咨询
服务热线
服务热线:13125520620
TOP

mysql slave 重新同步单个表的过程 - 数据库开发

发布时间:2011-11-12 浏览:5519

mysql> RENAME TABLE rep TO rep_maint;
Query OK, 0 rows affected (0.01 sec)
 
mysql> SELECT * FROM rep_maint INTO OUTFILE '/tmp/rep.txt';
Query OK, 0 rows affected (0.01 sec)
 
mysql> CREATE TABLE rep_new LIKE rep_maint;
Query OK, 0 rows affected (0.00 sec)
 
mysql> LOAD DATA INFILE '/tmp/rep.txt' INTO TABLE rep_new;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Deleted: 0  Skipped: 0  Warnings: 0
 
mysql> RENAME TABLE rep_maint TO rep_old, rep_new TO rep;
Query OK, 0 rows affected (0.00 sec)

TAG
软件定制,软件开发,瀚森HANSEN,辽宁,沈阳,抚顺
0
该内容对我有帮助