开发者

how to know if mysql binary log is enable through sql command?

开发者 https://www.devze.com 2023-03-25 22:21 出处:网络
I have a mysql instance running and I want to know if binary log is enable for that instance without logging into the machine and check my.cnf file. Is there a way to do that?

I have a mysql instance running and I want to know if binary log is enable for that instance without logging into the machine and check my.cnf file. Is there a way to do that?

Thanks, S开发者_如何学Pythonean


SHOW VARIABLES LIKE 'log_bin';


After login Execute the following command

SHOW BINARY LOGS

If there is no binary logs then you will get a message similar to 'You are not using binary logging'


SELECT * from information_schema.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'LOG_BIN';

or

SELECT @@log_bin;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号