How to get slave status into a stored procedure variable in MySQL version 8.0

I'm trying to convert the following query that worked in MySQL 5.5 to MySQL 8.0. I am getting the following error: "Error Code: 1109. Unknown table 'GLOBAL_STATUS' in information_schema"

If this table no longer exists in version 8.0, is there another way to get the slave status?

drop procedure if exists aspDoCustDbCheck;;
CREATE  PROCEDURE `aspDoCustDbCheck`()
 declare vSlaveSts varchar(12);
 SELECT variable_value into vSlaveSts
 FROM information_schema.global_status 
 WHERE variable_name='SLAVE_RUNNING';
 Select vSlaveSts as SlaveSts
  ,Now() as Time
end ;;

call aspDoCustDbCheck();

Open in new window

Brad JonesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do not have accessto 8, but why not simply run the query to see whether there is another variable/reference to reach the information?
Check whether the table global_status is actually in there.

In your situation, you have a base of information from which you are working for,
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.