When I login to MySQL as root I usually set MROOTPASS environment variable
export MROOTPASS=my-secret-password
and then do
mysql -u root -p$MROOTPASS
this eliminates the need to reenter the password each time I connect to MySQL as root, but obviously it is insecure because the password is saved to the bash history file. Is it possible to prevent the password from being saved?