mysql 8.0 – Show detailed warning messages executing mysqlimport or mysql LOAD DATA


1) Add log-warnings and max error count statements to /etc/my.cnf

These configuration options cause detailed warning messages to be written in /var/log/mysql.log

[mysqld]
log-warnings
max-error-count=9999999999

2) Start the mysql client session using the –show-warnings option

mysql -u... -p -hlocalhost --show-warnings
Adding the –show-warnings option causes detailed warning messages to be displayed for LOAD DATA

3) In the mysql client, you can enable and disable automatic warnings display
using the warnings and nowarning commands, respectively, or their shortcuts, W and w
mysql> W

Show warnings enabled