查看mysql历史命令

默认情况下操作mysql会在家目录下创建一个隐藏的mysql历史命令文件.mysql_history
在管理授权mysql账户时也会记录这些明文密码到这个文件,非常的不安全

[root@localhost ~]# ls -al |grep mysql_
-rw-------   1 root root       875 7月   3 12:33 .mysql_history

解决方法:
    使用软链接到空文件:ln -s /dev/null ~/.mysql_history
原文地址:https://www.cnblogs.com/shansongxian/p/9759801.html