在用户访问MySQL控制台时,全部的命令历史都被记录在~/.mysql_history中。若是攻击者访问这个文件,他就能够知道数据库的结构。mysql
vim /etc/profilesql
export MYSQL_HISTFILE=/dev/null数据库
source /etc/profilevim
echo > /root/.mysql_historyspa
cat /root/.mysql_historyfile