Mysqlデータベースメンテナンス

589 ワード

1.表名の変更
alter table t1 rename to t1_back_20130502

2.構造のエクスポート
mysqldump -h192.168.1.1 -uroot -p1234 --default-character-set=utf8 --opt -d -R dbname tablename >d:\data_file_table_130507.sql

 3.データの再エクスポート
mysqldump -h192.168.1.1 -uroot -p1234    --default-character-set=utf8  -t -c dbname tablename> d:\data_file_data_130507.sql

 4.データのインポート
source D:/data_file_table_130507.sql
source D:/data_file_data_130507.sql