[root@kvm8 ~]# mysql -s -uroot -p123qwe mysql> use dyw; mysql>
mysql> select * from animals; id name foot 2 cat 4 3 chicken 2 1 dog 4 mysql>
mysql> select * from animals into outfile '/tmp/dump.txt'; mysql>
LOAD DATA 讀取檔案資料,匯入資料到資料庫。
mysql> load data local infile '/tmp/dump.txt' into table animals; mysql>
mysql> select * from animals; id name foot 2 cat 4 3 chicken 2 1 dog 4 2 cat 4 3 chicken 2 1 dog 4 mysql>