开发者

Moving binary logs in MySQL to a different hard disk

This question is about MySQL binary logs.

We need to move a binary log to a different hard disk.

What is the configu开发者_StackOverflow社区ration change required in MySQL?

Currently binary logs go into the same folder as the ibdata and there is a replication slave running which needs the binary logs.


Changing the log-bin works. BUT you need to copy the log-bin files first to the new location and modify the index file. If you dont'do this you will break your remote slave with the error:

Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'

More info here: http://freebsd.down-to-details.com/sys-admin/relocating-moving-mysql-binlogs/


From the way I read the doc, you can specify a path on the log-bin config.

To enable the binary log, start the server with the --log-bin[=base_name] option. If no base_name value is given, the default name is the value of the pid-file option (which by default is the name of host machine) followed by -bin. If the basename is given, the server writes the file in the data directory unless the basename is given with a leading absolute path name to specify a different directory. It is recommended that you specify a basename; see Section C.5.8, “Known Issues in MySQL”, for the reason.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜