Archive for Linux

Mysql replication errors

I’ve just wasted an hour trying to figure out why some code didn’t work on a webserver. The code is getting some info from the database, which is replicated from a master database. I was selecting new data, which weren’t on the slave due to replication errors.

I just did this in mysql

SLAVE STOP;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;

This way, they slave would skip the erroneous query and continue. Of course, the database won’t be in sync anymore. But since it was a dev-server, it doesn’t matter.

Comments

How to forward mail from your linux account

A small handy trick which I always forget.

To have mail to your linux-account forwarded to another address, just create a file in your direct called

.forward and type your preferred emailaddress in it. That’s all.

nano ~/.forward

Comments