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, Sean
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'
ERROR 1227 (42000) at line 1: Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation. Furthermore, even if you have privs, the result may be an error, which will cause you extra work if you are doing this in a script or program. ERROR 1381 (HY000) at line 1: You are not using binary loggingSELECT * from information_schema.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'LOG_BIN';
or
SELECT @@log_bin;
ERROR 1109 (42S02): Unknown table 'GLOBAL_VARIABLES' in information_schema