mysqldump匯出SQL出現亂碼解決

來源:互聯網
上載者:User

環境

MySQL 5.1 + 命令列工具

問題

mysqldump匯出SQL出現亂碼

解決

mysqldump -uroot --default-character-set=utf8 -p axt > kq.sql

總結

SQL出現亂碼很可能是資料庫的全域編碼和某個資料庫的編碼不一致。可以在匯出的時候加上編碼,可以修改成utf8或者gbk。

mysqldump –u使用者名稱--default-character-set=utf8 -p 資料庫名 >檔案路徑\檔案名稱.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.