首页 \ 问答 \ 恢复已清除的mysql binlog文件(Restoring purged mysql binlog files)

恢复已清除的mysql binlog文件(Restoring purged mysql binlog files)

我已经在一对服务器上设置了复制。 一个是主人,第二个是奴隶。

最近在master上binlog文件被过早清除(通过文件名,所以mysql没有阻止过早删除文件)。

现在SLAVE有状态:

从二进制日志读取数据时,来自master的致命错误1236:'无法在二进制日志索引文件中找到第一个日志文件名'

我不想恢复丢失的binlog文件,因此slave将从它完成的点重新开始读取。

这些文件已经存在,但我怎样才能强制主人“清除”它的日志列表(所以它们在SHOW BINARY LOGS中可见)?


I've got a replication set up on pair of servers. One is a master and second is a slave.

Recently on master the binlog files were purged too early (by filename so mysql haven't prevented too early removal of file).

Now the SLAVE has status:

Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'

I wan't to restore the missing binlog files so the slave will restart reading from the point it finished.

The files are already in place but how can I force master to 'unpurge' it's log list (so they are visible in SHOW BINARY LOGS)?


原文:https://stackoverflow.com/questions/8384635
更新时间:2022-02-17 19:02

最满意答案

我的建议是将数据库迁移到SQL Server作为第一步。 然后,第二步使用SQL DB服务在Microsoft Azure中托管数据库。

您可以在此处找到更多详细信息和价格: https//azure.microsoft.com/en-us/services/sql-database/

请务必检查单个数据库定价。 除非你想要弹性缩放和性能。


My suggestion would be to migrate the database into SQL Server as step one. Then step two host the database in Microsoft Azure using the SQL DB service.

You can find more details and pricing here: https://azure.microsoft.com/en-us/services/sql-database/

Be sure you check the single database pricing. Unless you want the elastic scaling and performance.

相关问答

更多
  • 我建议将Postgres 权限视为锁定表格的一种方法。 简而言之,您可以让您的后端作为一个对相关表具有完全访问权限的用户运行,当用户登录到应用程序时,他们将使用其权限被严格锁定的用户连接到Postgres (比如说,只读,如果你只是想做SELECT表面数据)。 例如,您可以针对Postgres服务器运行以下SQL: REVOKE ALL ON accounts FROM joe; GRANT SELECT ON accounts TO joe; 这将首先从表帐户的用户joe中删除所有权限,然后仅允许该表的 ...
  • 由于这些行没有任何类型的顺序唯一键号,因此您需要创建一个排名列: 如何在查询中排列记录 您需要确定一次将返回N个行数(N = 10,25,100)。 您需要跟踪用户所处的“页面”以及第一个和最后一个排名的值。 然后,当您为下一页进行调用时,它可能是接下来的N行>或<第一行和最后一行(取决于用户是转到上一页还是下一页)。 我确定有一种方法可以计算最后一页,第一页等。 Since it doesn't appear that you have any type of sequencial unique key ...
  • 在Windows机器上安装PostgreSQL ODBC驱动程序 。 创建一个指向PostgreSQL数据库的DSN。 启动Access会话并使用DSN导入PostgreSQL表。 过去我已经做了几次,发现它很快捷。 使用ODBC驱动程序进行访问会将PostgreSQL列数据类型转换为与Access兼容的类型。 这种方法应该适用于简单的表格。 但是,如果您的设计使用高级PostgreSQL功能,则这些功能可能无法很好地(或完全)转换为Access。 但是,由于您尚未创建数据库,我鼓励您容忍Access表设计 ...
  • 您的问题表明您已经了解sysWOW64子系统,因此请记住,在64位Windows机器上有两个“ODBC Administrator”应用程序... 适用于64位应用程序的C:\Windows\System32\odbcad32.exe ,以及 适用于32位世界的C:\Windows\SysWOW64\odbcad32.exe ...(是的,命名确实有点落后),在64位计算机上,您可以从Control Panel > Administrative Tools看到的是64位计算机。 您在其中创建的系统DSN在另 ...
  • 我不明白为什么为此编写java程序比手动编写更容易。 我会将oracle表转储到磁盘,然后将它们导入MS Access。 MS Access自身的导入功能(文件 - >获取外部数据)可能对ODBC导入很有用。 您甚至可以尝试使用其中一种(尽管是非免费的)工具1,2 ,它声称可以为您执行此操作。 I don't see why writing a java-program for this would be easier than doing it manually. I would dump the ora ...
  • 我的建议是将数据库迁移到SQL Server作为第一步。 然后,第二步使用SQL DB服务在Microsoft Azure中托管数据库。 您可以在此处找到更多详细信息和价格: https : //azure.microsoft.com/en-us/services/sql-database/ 请务必检查单个数据库定价。 除非你想要弹性缩放和性能。 My suggestion would be to migrate the database into SQL Server as step one. Then ...
  • 迁移的一种方法是不尝试在MS和MySQL之间迁移数据库表或从phpmyadmin导出并传输。 尝试使用WordPress导出功能将您的所有页面,帖子,类别等 - 或者只是博客文章,而不是其他内容 - 导出到XML文件中,然后可以将其导入到新的WordPress安装中。 有关详细信息,请参阅https://codex.wordpress.org/Tools_Export_Screen 。 这是一种将内容从安装转移到安装的高度可靠的方法,如果您多次运行以导入大文件,它就足够聪明,不会复制帖子。 运行时,您将获得 ...
  • 几件事情要考虑: 访问(MDB)数据库往往需要定期的紧凑/修复,正如您在标题中指出的那样,如果它们频繁使用。 不过,我很少发现它对性能的帮助很小。 如果真的很长时间,文件可能膨胀得很厉害,如果用户通过慢速网络连接访问它,这可能是问题的一部分。 有人会建议升级到SQL Server等“更大”的数据库,无论是在你的公司还是在这个论坛中。 除非你解决了问题,否则不要这样做,除非你有其他原因而不是表现。 这些问题有可能是由于糟糕的应用程序设计或数据库体系结构而导致的。 在不改变方法的情况下投掷更强大的问题工具不太可 ...
  • 也许问题可能是由于使用了LIKE通配符。 尝试*而不是%。 看到这里 。 Follow-up: I created an "Active Product" table to display new/existing products. Furthermore, I've created a seperate query that has MsgBox prompt, enabling users to search for LIKE terms by following this tutorial

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)