I want to append STDOUT or STDERR of command mysql_secure_installation
to a file for example /tmp/output.txt
but no success on below commands:
mysql_secure_installation >> /tmp/output.txt
mysql_secure_installation 1>> /tmp/output.txt
mysql_secure_installation 2>> /tmp/output.txt
Also tested STDIN and reserved buffers by below commands:
mysql_secure_installation 0>> /tmp/output.txt
mysql_secure_installation 3>> /tmp/output.txt
...
mysql_secure_installation 9>> /tmp/output.txt
It seems mysql_secure_installation
output buffers is many different from other commands and it's buffer cannot accessible. Is this true and how to handle it?
UPDATE 1:
CentOS tested and buffer works perfect but on my target os ( Ubuntu 16.04 LTS ) it doesn't work.
UPDATE 2:
Worked on Debian 9 too, but problem on ( Ubuntu 16.04 LTS ) exists.