在用户访问MySQL控制台时,所有的命令历史都被记录在~/.mysql_history中。如果攻击者访问这个文件,他就可以知道数据库的结构。
vim /etc/profile
export MYSQL_HISTFILE=/dev/null
source /etc/profile
echo > /root/.mysql_history
cat /root/.mysql_history
在用户访问MySQL控制台时,所有的命令历史都被记录在~/.mysql_history中。如果攻击者访问这个文件,他就可以知道数据库的结构。
vim /etc/profile
export MYSQL_HISTFILE=/dev/null
source /etc/profile
echo > /root/.mysql_history
cat /root/.mysql_history