Ricky Moorhouse

Blog

Recover from "Failed to open the relay log"

If you find that after rebooting your MySQL slave it stops replicating with the master and you see the "Failed to open the relay log" error in the logs it is probably caused by MySQL putting it's relay logs in /var/run by default, which gets cleared out on boot.

To fix this, you need to change the location MySQL uses for the logging by adding the following line to the [mysqld] section of /etc/my.cnf

relay-log = /var/lib/mysql/relay-bin

Then edit /var/lib/mysql/relay-log.info to point to the first new relay log (leaving the master information the same.

/var/lib/mysql/relay-bin.000001 1 mysql-bin.12345 123456789

Then from the mysql prompt start the slave:

mysql> START SLAVE;

(Source: Arjen's Journal)

Drawing of me

Abi drew this for me. She says I'm not a monster, I just have my teeth out!

Daddy by Abi

Self portrait

art

A traced picture on my iPhone, styled and touched up a bit for my twitter avatar and if you look closely, you can find it on my blog too...  I'm really liking Adobe Ideas for quick sketches, so there might well be more pictures of family and friends coming soon!

Monster #2

art

Same as #1 this was sketched in Adobe Ideas and finished in Sumo paint. I will give them names eventually, but for now Abi wants to call this one "princess bird"

Monster #1

art

Monster #1

This is Monster #1, his outline was drawn in Adobe Ideas on the iPhone, and then the colouring was added using Sumo Paint

Walking on water and developing software from a specification are easy if both are frozen.

Walking on water and developing software from a specification are easy if both are frozen.

Edward V Berard

Substitute fruit

Laura: Would you like some raspberries? Abi: I don't like raspberries. Can you get me ... erm ... a carrot instead? Laura: How about a banana? Abi: Oh Yeah! (excitedly)

Peacock

P1150553

Whilst browsing through my pictures on Flickr, Abi saw this and said:

"I always wished I could have a pet peacock"

Only load jQuery if not already present

Very useful method of ensuring jQuery is loaded before running the code that needs it - from How to build a web widget (using jQuery) - Alex Marandon

[js] /******** Load jQuery if not present *********/ if (typeof jQuery === "undefined" || jQuery.fn.jquery !== '1.4.2') { var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js") script_tag.onload = main; // Run main() once jQuery has loaded script_tag.onreadystatechange = function () { // Same thing but for IE if (this.readyState == 'complete' || this.readyState == 'loaded') main(); } document.getElementsByTagName("head")[0].appendChild(script_tag); } else { main(); } [/js]

Javascript Key Codes

37: left

38: up

39: right

40: down