MySQL: Import large file using SOURCE command

在 MySQL 匯入 sql 資料大都時候都是用 phpMyAdmin 這個軟體來代勞,不過有時候碰到非常巨大的 sql 檔案,動輒數百 MB,甚至更大時就超過了 phpMyAdmin 處理能力。

這時候比較方便的做法是用命令列來匯入,指令是 SOURCE

mysql> use exampledb;
Database changed

mysql> source C:\data.sql;

等待 MySQL 執行完畢就完工了,無痛匯入巨量的 sql 資料。


Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Exit mobile version