开发者

Is it not possible to show warnings when using mysqlimport?

开发者 https://www.devze.com 2023-04-10 03:26 出处:网络
This article: http:开发者_开发知识库//www.linuxask.com/questions/how-to-show-the-warnings-during-mysqlimport

This article: http:开发者_开发知识库//www.linuxask.com/questions/how-to-show-the-warnings-during-mysqlimport

says it is not possible to show warnings when using mysqlimport:

When you use mysqlimport to import data from text file, the number of warnings will be displayed at the end of import. But there is no way to show the actual warnings message.

Is that accurate? I have a server which does not allow LOAD DATA INFILE.


The answer is - no you cannot output warnings from mysqlimport.


I used the mysql CLI tool, passing an equivalent "LOAD DATA ..." command followed by a semicolon, followed by "SHOW WARNINGS". The resulting display is helpful in finding detail on each warning.

For example:

mysql <options> -e "LOAD DATA LOCAL INFILE 'foo' INTO TABLE bar; SHOW WARNINGS"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号