关于mysql导入文件,No previous outfile available, you must give a filename !,这个问题怎么解决呢?

请问,导入sql文件,出现了这个问题,应该怎么解决呢?
No previous outfile available, you must give a filename !
没有以前的外部文件可用,你必须给一个文件名!

img

 mysal>            create database test;
         OK,1  Query                   row affected                      (0.01sec)
 mysql>          use test
 Database changed
 mysgl>            use test;
 Database changed
 mysgl>            source D:TestmysqlVbjpowernode. sal;
 NO     previous outfile available, you must give a filename!
           sourceD:TestmysalVbjpowernode. sal;
 No     previous outfile available, you must give a filename!

要不写完source,然后直接将文件拖进试试

指定数据库:
use demo;
执行导入:检查您的文件路径是否有问题,路径不要手敲,直接复制过来,最后的分号不要
source C:\Users\admin\Desktop\student.sql

请尝试:

  1. 检查文件路径是否正确
  2. source后不用加;结束

source D:TestmysqlVbjpowernode. sql

请确保您在使用MySQL的“INFILE”函数之前已经将MySQL的“OUTFILE”函数用于向某个文件输出数据,然后才可以使用“INFILE”函数将这个文件中的数据导入MySQL中。另外,为了避免出现这种情况,您还可以通过去掉“OUTFILE”函数这一部分来将数据导入MySQL中。