在/etc/profile里面加上这些就够了
切换前dump,日志记录
[root@localhost /usr/local/crazy/records/chenliang ]# tail -f bash_history
2016-06-16 17:36:29 ##### chenliangpts/3 (124.192.156.166) #### mysqldump -uroot -pESBecs00 kingshard>kingshard.sql
sudo切换后dump,日志记录
-
[root@localhost /usr/local/crazy/records/root ]# tail -f bash_history
2016-06-16 17:36:12 ##### chenliang pts/3 (124.192.156.166) #### mysqldump -uroot -pESBecs00 kingshard>kingshard.sql3