I am new to mariadb server.

I added the following binary log files to my.cnf:

 log-bin = binary.log
 log-bin-index = bin-log.index
 max_binlog_size = 10M

When I view binary file with the following command:

 sudo mysqlbinlog binary.000001 

It shows me:

unknown variable 'log-bin=binary.log'

Please help me

  • --log-bin is not a system variable, and it can be set from the command line option only, not in settings file. According system variable is log_bin_basename. See dev.mysql.com/doc/refman/5.6/en/… – Akina Feb 12 at 12:11
  • @Akina again same error unknown variable 'log_bin_basename=binary1.log' – tajamul hussain Feb 12 at 12:18
  • Ensure you try to add these settings into [mysqld] section of config file. – Akina Feb 12 at 12:25
  • @Akina thanks alot it's working – tajamul hussain Feb 12 at 12:33