snippetsqlModerate
How do I show warnings when loading data created from mysqldump?
Viewed 0 times
showhowcreatedwarningsmysqldumploadingwhenfromdata
Problem
I've got a large .sql file with large insert into ... values ... statements. Many of these statements are generating warnings during execution. How can I get mysql to print the warnings?
If it hit control-C then the import stops and I'm dropped back to the OS command line.
Here is sample output from running the SQL:
If it hit control-C then the import stops and I'm dropped back to the OS command line.
Here is sample output from running the SQL:
Query OK, 9827 rows affected, 5403 warnings (0.20 sec)
Records: 9827 Duplicates: 0 Warnings: 5403
Query OK, 9859 rows affected, 5247 warnings (0.20 sec)
Records: 9859 Duplicates: 0 Warnings: 5247Solution
You should startup mysqld with log-warnings (it should be on by default) and also the max error count
You may have to start the mysql client with
This is not mysqld setting, it's a mysql client session setting.
You may want to add show-warnings to mysql client session
[mysqld]
log-warnings
max-error-count=9999999999You may have to start the mysql client with
SET SQL_WARNINGS = 1;This is not mysqld setting, it's a mysql client session setting.
You may want to add show-warnings to mysql client session
mysql -u... -p -hlocalhost --show-warningsCode Snippets
[mysqld]
log-warnings
max-error-count=9999999999SET SQL_WARNINGS = 1;mysql -u... -p -hlocalhost --show-warningsContext
StackExchange Database Administrators Q#14413, answer score: 13
Revisions (0)
No revisions yet.