数据库分库分表备份和shell脚本

#!/bin/bash

mysql=“mysql -uroot -p1234”

bei="mysqldump -uroot -p1234 "

ku=$mysql -e "show databases;"|sed 1d|egrep -v "schema|mysql|test"

for shu in k u d o         b i a o = ‘ ku do      biao=` kudo    biao=mysql -e “show tables from $ku;”|sed 1d`
for tables in b i a o d o             m k d i r − p / o p t / biao do          mkdir -p /opt/ biaodo      mkdirp/opt/(date +%F)
 
       $bei $shu t a b l e s > / o p t / tables >/opt/ tables>/opt/(date +%F)/KaTeX parse error: Expected group after '_' at position 4: shu_̲tables.sql   
done
done
 
定时任务
yum -y install crontab
编辑任务
crontab -e

你可能感兴趣的:(mysql,mysql)