반응형
1. binary log을 TEXT log로 바꾸기
/usr/local/mysql/bin/mysqlbinlog -s file_name-bin.001 > test.txt
2. binary log를 DB에 반영하기.
/usr/local/mysql/bin/mysqlbinlog file_name-bin.001 | /usr/local/mysql/bin/mysql -h localhost -uroot -p
3. Text Log를 DB에 반영하기.
ls -1 -t -r file_name.[0-9]* | xargs cat | /usr/local/mysql/bin/mysql -h localhost -uroot -p
/usr/local/mysql/bin/mysqlbinlog -s file_name-bin.001 > test.txt
2. binary log를 DB에 반영하기.
/usr/local/mysql/bin/mysqlbinlog file_name-bin.001 | /usr/local/mysql/bin/mysql -h localhost -uroot -p
3. Text Log를 DB에 반영하기.
ls -1 -t -r file_name.[0-9]* | xargs cat | /usr/local/mysql/bin/mysql -h localhost -uroot -p
반응형