In this geek practice article, the author talked about using
mysqladmin -u root -h host_name password "newpassword"
To set a new password. The man replied that he could leave the password in the shell history file and suggested using
mysql -u root mysql mysql> SET PASSWORD FOR root@localhost =PASSWORD('newpasswordgoeshere');
but another person said that he would leave the password in the .mysql_history file.
Security is not a problem for me (no one should have access to my computer), but is there a more effective alternative?
source share