mysql只匯出表結構或資料,mysql匯出結構

來源:互聯網
上載者:User

mysql只匯出表結構或資料,mysql匯出結構

只導資料不導結構

mysqldump -t 資料庫名 -uroot -p > xxx.sql


只導結構不導資料

mysqldump    --opt -d  資料庫名 -u -p > xxx.sql



匯出資料和表結構

mysqldump 資料庫名 -uroot -p > xxx.sql


匯出特定表結構

mysqldump -uroot -p -B 資料庫名 --table 表名 > xxx.sql


匯入資料

source /tmp/xxx.sql




mysql只匯出資料庫表的結構,而不匯出表資料一定要用命令匯出

mysql -u XXX -pXXX --no-data DBname>D:\back.sql
給個好評喔
 
mysql只匯出資料庫表的結構,而不匯出表資料一定要用命令匯出

mysql -u XXX -pXXX --no-data DBname>D:\back.sql
給個好評喔
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.