Home > Database > Mysql Tutorial > body text

Linux 怎么通过Shell脚本定时备份MySQL数据库

WBOY
Release: 2016-06-07 17:06:30
Original
1032 people have browsed it

为了应对意外,备份数据库是非常必须的。备份脚本怎么写呢? 在写脚本之前,先假设mysql的bin目录是:/usr/local/mysql/bin/ PA

为了应对意外,备份数据库是非常必须的。备份脚本怎么写呢?

在写脚本之前,,先假设mysql的bin目录是:/usr/local/mysql/bin/

将上面的脚本保存为 .backup.sh 加入到 crontab 中即可。具体怎么加到计划任务,请参阅:Linux下Nginx如何切割访问日志? (见 ) 和 Linux crontab命令小解 (见  ) 

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!