Enable MySQL Binary Log

How to enable binary log in mySQL. I tried:

1) Putting this SQL code in phpmyadmin

SET GLOBAL log_bin ='ON'

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

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

--log-bin= C:\mySqlbinlog

This shows that I cannot access the database when I try to go to a web page.

Any idea how I can enable binary log via phpmyadmin or in my.ini file? Any help was appreciated.

+5
source share
3 answers

Just put the log_bin parameter after mysqld. Please indicate the path for binlog, where you have a lot of space, because binlog eats a lot of disk space.

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

, max_binlog_size, max_binlog_cache_size, sync_binlog

[] (http://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html)

+3

, - log-bin, my.ini( [mysqld]):

log-bin=C:\mySqlbinlog

MySQL !

+1

wamp MySQL ver 5.6.17, .

my.ini . [mysqld]. log-bin=C:\Your_Dir_Here [mysqld]. MySQL. , MySQL. SHOW BINARY LOGS;

:

+------------------+-----------+
| Log_name         | File_size |
+------------------+-----------+
| MySQL_Log.000001 |       120 |
+------------------+-----------+
1 row in set (0.00 sec)

Note I do not know exactly how it works log-bin, but I would recommend an absolute path so that you know exactly where your log files will be. In addition, your MySQL installation will not read the file my.iniuntil the services are restarted.

Further reading http://dev.mysql.com/doc/refman/5.6/en/binary-log.html

This link has a lot to do with binary logs. It is literally too much for me to even disguise.

If I missed something or if I am vague, leave a comment and I will try to answer.

+1
source

All Articles