[root@kvm8 ~]# mysql -uroot -p123qwe -e "use dyw; select * from animals;" +----+---------+------+ | id | name | foot | +----+---------+------+ | 2 | cat | 4 | | 3 | chicken | 2 | | 1 | dog | 4 | +----+---------+------+
[root@kvm8 ~]# mysqldump -uroot -p123qwe dyw animals > abc.sql
[root@kvm8 ~]# mysqlimport -uroot -p123qwe --local dyw animals.txt dyw.animals: Records: 3 Deleted: 0 Skipped: 0 Warnings: 0
[root@kvm8 ~]# mysql -uroot -p123qwe -e "use dyw; select * from animals;" +----+---------+------+ | id | name | foot | +----+---------+------+ | 2 | cat | 4 | | 3 | chicken | 2 | | 1 | dog | 4 | | 2 | cat | 4 | | 3 | chicken | 2 | | 1 | dog | 4 | +----+---------+------+
[root@kvm8 ~]# mysql -uroot -p123qwe dyw < abc.sql
[root@kvm8 ~]# mysql -uroot -p123qwe -e "use dyw; select * from animals;" +----+---------+------+ | id | name | foot | +----+---------+------+ | 2 | cat | 4 | | 3 | chicken | 2 | | 1 | dog | 4 | +----+---------+------+