1 使用系统定义的变量 语法:

SELECT @@server_id

2.使用SHOW VARIABLES命令

show variables like 'server_id';

 

3.查看Mater数据有哪些slave,使用命令:

select * from information_schema.processlist as p where p.command = 'Binlog Dump'; 

 

相关文章: