如何忽略文件中的X行将sql文件导入数据库? [英] How to import sql file to database ignoring X lines in file?

查看:122
本文介绍了如何忽略文件中的X行将sql文件导入数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将相当大的.sql文件导入mysql数据库.但是,在导入一段时间后,我遇到了一个错误,因此我想对其进行修复,然后继续从该文件的特定行(当我上次结束时)进行导入,这可能吗?

I'm trying to import pretty large .sql file to mysql database. However After some time of importing it, I encountered an error, so I want to fix it, and continue importing from the specific line of this file (when I ended last time), is this possible?

推荐答案

下一次,您可以尝试使用-f导入mysql文件以忽略错误:

Next time you can try to import mysql file with -f to ignore the errors:

-f, --force         Continue even if we get an SQL error.

这篇关于如何忽略文件中的X行将sql文件导入数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆