Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it not possible to show warnings when using 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.

like image 575
jerrygarciuh Avatar asked Oct 03 '11 22:10

jerrygarciuh


People also ask

How to SHOW mysql warnings?

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.

What is Mysqlimport?

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.


2 Answers

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

like image 68
jerrygarciuh Avatar answered Sep 21 '22 20:09

jerrygarciuh


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"
like image 36
bobchase Avatar answered Sep 24 '22 20:09

bobchase