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 mysql client also has a number of options related to warnings. The \W command will show warnings after every statement, while \w will disable this.
The mysqlimport client provides a command-line interface to the LOAD DATA SQL statement. Most options to mysqlimport correspond directly to clauses of LOAD DATA syntax.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With