1.直接用命令
2.用分割器分割,再用导入
最后要commit,不然没有真的导入数据库中。
其中出现的问题:The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
解决方法:
【我的做法】【必须SQL文件和数据表都要在指定目录中】指定路径查询:show variables like 'secure_file_priv%';
查询到的value值就是指定路径。
【方法2】在my.ini中修改路径,secure_file_priv=‘你想要的路径’,----可以从指定路径导入导出数据
【方法3】在my.ini中修改路径,secure_file_priv= -----可以在任何路径导入导出。注意:等号要有,后面空着,引号也不要写
3.用python的pandas导入