将来的你会感谢现在努力的自己,骚年,趁年轻多努力学习 ------ Jasper_boy

查看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

 

posted @ 2018-10-09 13:32  Jasper_boy  阅读(2407)  评论(0编辑  收藏  举报