o**********a 发帖数: 330 | 1 LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet;
从客户端登陆mysql sever:在mysql sever 里面已经创建好一个表格 student
如何将客户端 f盘下的student.txt的数据导入这个表格里面
看mysql的手册用“LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet”这个
语句,但是自己试了几次都没成功
新手,大家多帮助 | c****n 发帖数: 89 | 2 if your database and the file '/path/pet.txt' are in the same server,
you usually don't use 'LOCAL'. only when you use -h switch to connect
DB on the remote server, you need to specify 'LOCAL'.
Another thing is the file permission issue, under Linux, it's easier to
just copy this file to /tmp directory and load data from there, or you
have to specify proper permission bits. not sure about Windowns though.
【在 o**********a 的大作中提到】 : LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet; : 从客户端登陆mysql sever:在mysql sever 里面已经创建好一个表格 student : 如何将客户端 f盘下的student.txt的数据导入这个表格里面 : 看mysql的手册用“LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet”这个 : 语句,但是自己试了几次都没成功 : 新手,大家多帮助
|
|