定时备份MySQL容器的数据,报错the input device is not a TTY
摘要:
查看定时日志 # 定时任务输出指向log文件 crontab -l 00 3 * * * /usr/bin/sh /data/backup.sh > /root/backup.log 2>&1 cat /root/backup.log the input device is not a TTY 解决
MySQL数据库 bin日志过大,清除并限制保存日志的数量
摘要:
清除bin日志文件 mysql -uroot -p123456 # 查看当然日志保存天数 0为默认,也就是日志不过期 show variables like '%expire_logs_days%'; # 临时设置只保留七天bin日志 set global expire_logs_days=7; #