Question

i have a question concerning the alias LAST_SQL_ERROR and LAST_SQL_ERRNO that we get in command 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. thank you.

Was it helpful?

Solution

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top