Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable the MySQL Binary log

How do I enable the Binary log in mySQL. I have tried:

1) Entering this SQL code on phpmyadmin

SET GLOBAL log_bin ='ON'

This gave me an error message that bin_log is a read-only file;

2) Inserting this into my.ini file below [mysqld]

--log-bin= C:\mySqlbinlog

This displays that I cannot access the database when I try to get to the webpage.

Any idea how I can enable the Binary Log through phpmyadmin or in the my.ini file? Any help appreciated.

like image 868
K Clark Avatar asked Feb 07 '13 17:02

K Clark


1 Answers

Just Put log_bin parameter after mysqld. Please give path for binlog where you have large amount of space because binlog eats lots of disk space.

log_bin = "path where want to store bin files.extension"

You can also use some other parameters like max_binlog_size, max_binlog_cache_size, sync_binlog for well performance

For More Here's [a link] (http://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html)

like image 94
Ronak Vyas Avatar answered Oct 02 '22 09:10

Ronak Vyas