1
votes

I was referring this link to perform MySql master slave replication for a particular mysql database in my Windows server.

Its mentioned to write the following configuration in the my.ini file.

log-bin = /var/log/mysql/mysql-bin.log
binlog-do-db=exampledb
server-id=1

Since I am using a windows server I cannot use the above path for the log-bin attribute. So which is the log-bin path for mysql running in a windows server?

Thanks

2

2 Answers

0
votes

If you did not change your default data path (I am assuming this the case based on your post) then your path would look something like this

log-bin ="C:\ProgramData\MySQL\MySQL Server 5.6\mysql-bin.log"

If you are running version 5.5 it would look like this:

log-bin="C:\ProgramData\MySQL\MySQL Server 5.5\mysql-bin.log"

The key thing to remember here is that MySQL has to have permission to write the logs to wherever you are writing them to.

You could even create another folder and call it log within the MySQL folder. The path would look like this:

log-bin ="C:\ProgramData\MySQL\MySQL Server 5.6\log\mysql-bin.log"

Just as a side note: you should really consider looking at how mysql is installed on your windows server before going into more complex things like master-slave replication...

0
votes

For windows systems, you can use something like

log-bin = "F:/mysql/mysql-bin.log"

Which path you're using actually doesn't really matter too much, but keep in mind the MySQL needs write permissions for it. P.e., for backuping reasons I'd like it to stay close to my MySQL installation data directory.