In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today Xiaobian shared with you is mysql simple full backup script and fast recovery method, many people do not know much, today Xiaobian in order to let everyone know more about mysql, so give you a summary of the following content, look down together. I'm sure you'll find something.
A simple mysql full backup script that backs up the last 15 days of data.
backup
#Backup mysql database daily (save last 15 days data script)DATE=$(date +%Y%m%d)/home/cuxiaohuan/lamp/mysql5/bin/mysqldump -uuser -ppassword need_db > /home/cuxiaohuan/bak_sql/mysql_dbxx_$DATE.sql;find /home/cuxiaohuan/bak_sql/ -mtime +15 -name '*.sql' -exec rm -rf {} \;
recovery
mysql data import
drop databases need_db;create databases need_db;
Import data: encoding must be set for recovery
./ mysql -uroot -p --default-character-set=utf8 need_db < xx.sql
The above is a brief introduction to mysql simple full backup scripts and quick recovery methods, of course, the detailed use of the above differences have to be used by everyone to understand. If you want to know more, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.