將/etc/passwd 中需要的內容輸出到 /tmp/passwd中
awk -F ':' '{print $1, $3, $4, $6, $7}' /etc/passwd > /tmp/passwd
創建表 passwd create table passwd (name char(10),uid int,gid int,home char(30),bash char(20));
導入數據load data infile '/tmp/passwd' into table passwd fields terminated by " ";
若出現
出現ERROR 13 (HY000): Can't get stat of '/tmp/passwd' (Errcode: 13) 表示當前導入數據的文件所在的目錄權限不夠 該爲777就可以了