Compare a global_status variable inside if else statement?
0
How can I stop the slave if it is already running using sql query statements only? So far I tried to do something like below but getting sql syntax error. I think it is due to the borders of result in conditional statement. if ((select VARIABLE_VALUE from information_schema.GLOBAL_STATUS where VARIABLE_NAME = 'slave_running')=ON) then STOP SLAVE; end if;
mysql condition if-not-exists mariadb-10.3
share | improve this question
edited 2 mins ago
SkyRar
asked 1 hour ago
...