mysql中数据的导入
步骤
-
创建对应的表
-
拷贝文件到数据库搜索路径 show variables like “%secure%”;show variables like “%secure%”;
sudo cp 源文件 /var/lib/mysql-files/ -
执行导入语句
load data infile “绝对路径/文件名”
into table 库名.表名
fields terminated by “分隔符”
lines terminated by “\n”;
mysql中数据的导入
步骤
创建对应的表
拷贝文件到数据库搜索路径 show variables like “%secure%”;show variables like “%secure%”;
sudo cp 源文件 /var/lib/mysql-files/
执行导入语句
load data infile “绝对路径/文件名”
into table 库名.表名
fields terminated by “分隔符”
lines terminated by “\n”;