提取出来后,里面就是所有对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,而alenosqloptionslikemongodb,redis和calablesolutionsoluntionsoluntionsoluntionsolundortionsolunsolunsstructureddata.blobobobsimplobissimplobisslowderperformandperformanceperformancewithlararengelitiate;

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 lengengters lengengtings,varchar forbariaible lengength,varchariable length,andtext/blobforlabforlargerdata.2 seterters seterters seterters seterters


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

SublimeText3 英文版
推荐:为Win版本,支持代码提示!

SublimeText3 Linux新版
SublimeText3 Linux最新版

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)