I get the following replication error in SHOW SLAVE STATUS \G;
Error 'Unknown column 'branch' in 'field list'' on query. Default database: 'db'.
The replication also has been stopped due to this.
How can I fix this?
If you check the Last_Errno row the error code of the error that caused replication to stop is 1054 (Unknown column '%s' in '%s'). If you want the MySQL slave to ignore such errors, just open your my.cnf (on Debian and Ubuntu it's /etc/mysql/my.cnf)...
Edit the my.cnf
vim /etc/mysql/my.cnf
You can skip multiple errors or only 1054
slave-skip-errors = 1062,1054
Restart MySQL
/etc/init.d/mysql restart