views:

609

answers:

1

I've installed MySQL as part of XAMPP.

While attempting to set up replication, I've added the following lines to c:\windows\my.ini:

[mysqld]
log-bin=C:/mysql-bin
server-id=1

As you can see, I've specified a full path name for the logging file, so there should be no doubt about where it is. I've also used a forward slash as recommended. I've confirmed in WinMySQLadmin that my.ini is being read.

I've run an INSERT query, and confirmed in phpMyAdmin that the table is updated. I've done a FLUSH TABLES WITH READ LOCK. At the link above, that's the recommended next step in setting up replication, but just in case output to the log file was being buffered, I hoped this would flush it. But no files of the form mysql-bin* appear anywhere on the C: drive. Can anyone help?

+1  A: 

The answer appears to lie in a hidden my.cnf file.

MySQL configurations can be stored in my.ini or my.cnf, in C:\, C:\WINDOWS or the MySQL directory itself. In Windows Explorer, my.cnf appears as just plain my (even though I'm not hiding extensions for known file types). If I ask Windows to search for it, it doesn’t find it (apparently it thinks .cnf files are short-cuts and ignores them). If both my.ini and my.cnf exist, the all-but-invisible my.cnf takes precedence.

It doesn't help that WinMySQLadmin displays the contents of my.ini (which are ignored), but not of my.cnf (which aren’t).

Dave McLaughlin