HISTFILESIZE=2000
HISTSIZE=2000
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S $USER: "
export PROMPT_COMMAND='{ command=\$(history 1 | { read x y; echo \$y; }); logger -p local1.notice -t bash -i "user=\$USER,ppid=\$PPID,from=\$SSH_CLIENT,pwd=\$PWD,command:\$command"; }'
ssh root:[email protected] 22

数据库主从操作:

mysqldump -unextev_rc -p'Nextev!@#' -h x.x.x.x -B nextev_rc --master--data=2 --single-transaction -R >nextev.sql  mysql导出函数
CHANGE MASTER TO
MASTER_HOST='45.33.xxx.xxx',
MASTER_PORT=3306,
MASTER_USER='elk',
MASTER_PASSWORD='aviagames',
MASTER_LOG_FILE='mysql-bin.000619',
MASTER_LOG_POS=66521467;
GRANT REPLICATION SLAVE ON *.* to 'rep1'@'45.33.xxx.xxx' identified by ‘aviagames’;
stop slave;
start slave;
PS1='\[\e[32;40m\][\u@\h \w \t]$ \[\e[0m\]' 显示颜色