Reputation: 1050
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
I tried adding 2>/dev/null, &>/dev/null, etc, nothing seemed to suppress the warnings.
Upvotes: 3
Views: 17815
Reputation: 332
mysql_tzinfo_to_sql /usr/share/zoneinfo 2>/dev/null | mysql -u root mysql
The command that is producing the error output to STDERR is the first command, not the second one. Put the STDERR redirection before the pipe, and this should fix your problem.
Upvotes: 6
Reputation: 75548
Try enclosing it on a subshell
( mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql ) &>/dev/null
Upvotes: 0
Reputation: 185530
Better give your exact code attempt and warnings in your original post, but if you try this one :
{ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql; } 2>/dev/null
or
mysql_tzinfo_to_sql 2>/dev/null /usr/share/zoneinfo |
mysql -u root mysql 2>/dev/null
that should work.
Upvotes: 3