2

Environment: Windows 2008 R2, MySQL 5.051b

Two servers:

  • server1: 192.168.2.8
  • server2: 192.168.2.9

server1 > my.ini

[mysqld]
server-id = 1
auto-increment-increment = 2
auto-increment-offset = 1
log-bin = mysql.bin 
bind-address = 0.0.0.0

server2 > my.ini

[mysqld]
server-id = 2
auto-increment-increment = 2
auto-increment-offset = 2
log-bin = mysql.bin 
bind-address = 0.0.0.0

mySQL Command Line Client

mysql > show master status;

result

Empty set (0.00 sec)

However, we cannot find and mysql.bin in mySQL directory and we find the binary logs are disabled.

How should I enable the binary log?

Ladadadada
  • 25,847
  • 7
  • 57
  • 90
stanley
  • 21
  • 2
  • Have you actually set up the replication? (CHANGE MASTER TO ......). An empty 'show master status;' is exactly what you see when it hasn't been configured (or if it's been restarted and the file containing the master info has been removed/corrupted). –  Jun 18 '13 at 17:21
  • Did you restart MySQL after changing the configuration files? In your case, the `log-bin` option is an *absolute* path rather than a relative path inside the `datadir` directory. See [Bug 28603](http://bugs.mysql.com/bug.php?id=28603) and the note on the [binary logging page for 5.0](http://dev.mysql.com/doc/refman/5.0/en/binary-log.html). Note that these bugs were resolved more than five years ago and both the major and minor revisions of the version you are using are *years* out of date and no longer supported. You should consider upgrading. – Ladadadada Jun 21 '13 at 08:10

0 Answers0