简体   繁体   English

命令的 last_sql_error 显示复制 MySQL 中的从属状态

[英]last_sql_error of command show slave status in replication MySQL

i have a question concerning the alias LAST_SQL_ERROR and LAST_SQL_ERRNO that we get in command SHOW SLAVE STATUS.我有一个关于别名 LAST_SQL_ERROR 和 LAST_SQL_ERRNO 的问题,我们在命令 SHOW SLAVE STATUS 中获得了这些别名。 Is there command that can recover to me just these two aliases.是否有命令可以仅恢复这两个别名。 the command show slave status recover all the information about replication, i want just to recover last_sql_error end last_sql_errno.命令 show slave status 恢复所有关于复制的信息,我只想恢复 last_sql_error end last_sql_errno。 thank you.谢谢你。

I don't think there is a direct way to do this until MySQL 5.7, when that information is available in the performance_schema.replication_execute_status_by_coordinator table.我认为在 MySQL 5.7 之前没有直接的方法可以做到这一点,当时该信息在performance_schema.replication_execute_status_by_coordinator表中可用。

If you are on an older version (which you almost certainly are) then you'll probably need to execute SHOW SLAVE STATUS and parse the output in the language of your choice to extract the fields you are interested in.如果您使用的是旧版本(您几乎肯定是),那么您可能需要执行SHOW SLAVE STATUS并以您选择的语言解析输出以提取您感兴趣的字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM