mysql
Henry__jia
这个作者很懒,什么都没留下…
展开
-
linux下mysql定时备份命令
linux下,如需对mysql做备份,可以做个shell文件,一劳永逸 [root@iZ2zeavn7cbxg2g9bs5donZ mysqlbackup]# cat mysql_backup.sh #!/bin/sh . /etc/profile . ~/.bash_profile db_user='root' db_password='123456' db_name='openhis' backup_dir='/usr/local/mysqlbackup/' current_time=$(date原创 2021-07-28 11:46:41 · 478 阅读 · 0 评论 -
linux下mysql做定时备份
cd /usr/local/mysqlbackup/ vi mysql_backup.sh #!/bin/bash db_user='root' db_password='密码' db_name='数据库名' backup_dir='/usr/local/mysqlbackup/' #你的路径 current_time=$(date +'%Y-%m-%d_%H%M%S') filepath=$backup_dir$current_time'.sql.gz' echo '开始导出数据库...' mysql原创 2021-07-21 11:05:02 · 155 阅读 · 0 评论