提取出来后,里面就是所有对terminfo的sql语句了,把这些数据导入到测试库terminfo0730表中
事情是这样的:由于个人粗心,在7月30号那天协助其它部门批量更新一些数据,谁知道全局更新了,而这个问题竟然在9月26号才发现告知我。他们要求把更新有误的数据恢复到7月30号之前状态,并且7月30号到9月26号这段时间所做的增删改的操作也要更新进去。由于之前没啥经验,心里也没底,但是没办法,自己做错事自己承担。
做法思路:把备份的数据导到测试库里面去,然后把7月30号到9月26号之间的binlog日志提取出对这个表进行操作的sql语句,然后再导进去。
苦逼的还原过程开始了.........
1.幸好本人养成了个好习惯,无论改动的大小我都会先备份一份数据
-rw-r--r-- 1 root root 2473664 07-30 09:38 terminfo-bak0730.sql
找到了,果然是7月30号早上09点38分左右备份的,幸好有备份啊,要不然就悲催了.......先把备份的导到测试数据库上,表名改为terminfo0730,然后再把当前生产的数据导到,表名改为terminfo0926,这样的做法是在还原数据后匹配一下数据有没有对得上。
+----------------+
2.最重要的一步来了,,就是提取binlog日志。因为7月30号备份的,所以要找7月30号之后到9月26号的binlog。
利用mysqlbinlog命令先进行第一轮的sql语句提取
#mysqlbinlog --no-defaults --database=ecard --start-datetime='2012-07-30 09:38:00' mysql-bin.000086 > log86.txt # 这里要设置起始时间
#mysqlbinlog --no-defaults --database=ecard mysql-bin.000087 > log87.txt
#mysqlbinlog --no-defaults --database=ecard mysql-bin.000088 > log88.txt
#mysqlbinlog --no-defaults --database=ecard mysql-bin.000089 > log89.txt
#mysqlbinlog --no-defaults --database=ecard mysql-bin.000090 > log90.txt
#ls -l
提取出来后是全部的sql语句,而我需要的是只对terminfo操作的sql语句,所以要进行第二轮提取
#grep terminfo log86.txt > log86-terminfo.txt #依次grep出来
提取出来后,里面就是所有对terminfo的sql语句了,把这些数据导入到测试库terminfo0730表中
mysql > source log86-terminfo.txt; #依次source进去,务必要注意顺序问题!!!
导进去之后再比较一下terminfo0730和terminfo0926表的数据数量有没有一样,然后再叫部门同事验证一下数据正确性。
到此,数据成功恢复还原。一次难忘的经历啊,也同时告诫自己,细心细心再细心!!

mysqlviewshavelimitations:1)他們不使用Supportallsqloperations,限制DatamanipulationThroughViewSwithJoinsOrsubqueries.2)他們canimpactperformance,尤其是withcomplexcomplexclexeriesorlargedatasets.3)

porthusermanagementinmysqliscialforenhancingsEcurityAndsingsmenting效率databaseoperation.1)usecReateusertoAddusers,指定connectionsourcewith@'localhost'or@'%'。

mysqldoes notimposeahardlimitontriggers,butacticalfactorsdeterminetheireffactective:1)serverConfiguration impactactStriggerGermanagement; 2)複雜的TriggerSincreaseSySystemsystem load; 3)largertablesslowtriggerperfermance; 4)highConconcConcrencerCancancancancanceTigrignecentign; 5); 5)

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

通過PHP網頁界面添加MySQL用戶可以使用MySQLi擴展。步驟如下:1.連接MySQL數據庫,使用MySQLi擴展。 2.創建用戶,使用CREATEUSER語句,並使用PASSWORD()函數加密密碼。 3.防止SQL注入,使用mysqli_real_escape_string()函數處理用戶輸入。 4.為新用戶分配權限,使用GRANT語句。

mysql'sblobissuitableForStoringBinaryDataWithInareLationalDatabase,而ilenosqloptionslikemongodb,redis和calablesolutionsolutionsolutionsoluntionsoluntionsolundortionsolunsonstructureddata.blobobobissimplobisslowdeperformberbutslowderformandperformancewithlararengedata;

toaddauserinmysql,使用:createUser'username'@'host'Indessify'password'; there'showtodoitsecurely:1)choosethehostcarecarefullytocon trolaccess.2)setResourcelimitswithoptionslikemax_queries_per_hour.3)usestrong,iniquepasswords.4)Enforcessl/tlsconnectionswith

toAvoidCommonMistakeswithStringDatatatPesInMysQl,CloseStringTypenuances,chosethirtightType,andManageEngencodingAndCollationsEttingSefectery.1)usecharforfixed lengengtrings,varchar forvariable-varchar forbariaible length,andtext/blobforlargerdataa.2 seterters seterters seterters


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

Dreamweaver Mac版
視覺化網頁開發工具

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境

記事本++7.3.1
好用且免費的程式碼編輯器

WebStorm Mac版
好用的JavaScript開發工具

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。