How to get lost data to mysql replication slave -


i'm having master-slave mysql replication setup.

suddenly slave crashed. , master worked without problem. started slave again. , working fine. data sync happening ok.

but problem is, data not there on slave @ time when slave down. (new tables , rows of tables).

i did

change master master_log_file='mysql-bin.xxxxxx', master_log_pos=xxxxx 

with latest position of master. lost tables , rows not coming slave.(row counts lesser master on tables;)

note: current data syncing working. problem can't lost data.

is there way data without restarting master database , without going through whole process again ?

thanks

this how when slave gets out of sync....

on master...

# mysqldump -u user -p --all_databases --master-data > all_mysql_data.sql 

then on slave...

# mysql -u user -p -e 'slave stop;'  # mysql -u user -p < all_mysql_data.sql  # mysql -u user -p -e 'slave start;'  # mysql -u user -p -e 'show slave status\g;' 

it read on mysqldump version. pay close attention --all_databases , --master-data options. powerful ju-ju. ;)


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -