Chris Worfolk's Blog


Data missing from MySQL replication due to column mismatch

February 16th, 2013 | Life, Tech

If you are running MySQL replication, you may find that the structure of a table is brought over, but not the data. You can troubleshoot this by logging into the slave MySQL and showing the status.

SHOW SLAVE STATUS \G;

You may find an error similar to the following.

Table definition on master and slave does not match: 
Column 1 size mismatch - master has size 150, example_db.test_table 
on slave has size 50. Master's column size should be <= the slave's column size.

This is usually caused because you are using different character sets. In the example above, the master is set to UTF8 (utf8_general_ci) while the slave database is set up in Latin1. You can fix this in two ways (and should probably do both).

First, to change the database, log into phpMyAdmin and go to the operations tab. Here you change it from the dropdown and then hit save.

Secondly, you should change the default charset in MySQL to be UTF8 (you could also change it to Latin1 if that is what your master is running but in this day and age, everything should really be running UTF8). You can do this by editing your my.cnf.

[mysqld]
default-character-set=utf8

After editing it, you will need to restart MySQL. Any databases created from then on will default to UTF8.

Galileo Day 2013

February 15th, 2013 | Foundation, Life

galileo-day

Happy Galileo Day! Leeds is lucky enough to be hosting two Feasts in honour of the man – one at Fazenda at lunchtime and one at Browns this evening. Tomorrow, also sees Leeds Skeptics host the 2013 Galileo Day Lecture, Brian Quinn with a talk entitled “Superstition – The Odd Delusion”.

Were the Catholics Framed?

February 14th, 2013 | Public Speaking

For my seventh project in my Toastmasters Competent Communicator manual, “research your topic”, I presented a talk entitled “Were the Catholics Framed?” This looked at whether the gunpowder plot was actually a set up by the Protestants, to frame the Catholics and increase the persecution.

Much like the arguments made that 9-11 was allowed to create an excuse to invade Afghanistan, the claims against 5-11 are almost certainly untrue as well. Not that there isn’t good evidence, but if you compare it to the Moon Landings, there is what looks like good evidence to suggest they were faked too – but when you dig a little deeper, you soon find the evidence isn’t so good, and you need very good evidence to belief a conspiracy theory.

I felt the talk went well, and managed to see off some good competition to take another Best Speaker ribbon – my fifth overall, and forth in a row. That said, there is certainly some room for improvement.

Part of my talk included a letter, which I read out, but having learned the letter I decided not to glance at it. This was a risky strategy because it might look to some people as if the letter wasn’t genuine, and indeed one person said he had wondered this. The letter was of course genuine, I had just prepared reasonably well, but maybe a few fake glances down at it would have been helpful.

Given the time constraints, I also cut some material out and hoped that it still all made sense. It did, except perhaps for my use of the word recusancy – the act of not attending CoE services, a crime that Catholics were often fined for.

I also felt I could have worked more movement into the speech, though nobody pulled me up on this in the evaluation or feedback. In any case there is work to do – as I write this, we are only 26 days away from the first round of the Public Speaking World Championships – and I haven’t started my speech yet!

Super Bowl

February 13th, 2013 | Distractions, Life

Last week, we all gathered round to watch the third most watched sporting event in the world – the Super Bowl.

Actually, I don’t know where those figures are from. The reality is, we have almost no idea what the most watched events in the world are, but if we did, it probably would point to the Olympics. But it’s safe to say a fair few people were watching with us.

While ultimately, my favourite team, the San Francisco 49ers, lost to the Baltimore Ravens, a good night was had by all, and no one went away bitter about the fact that the 49ers only lost because the judges refused to throw a flag for the blatant pass interference against Michael Crabtree on the 4th and goal that decided the match. No one.

As usual at these sorts of events, we made too much food, allowing us to spend another two days living off ribs and wings – and what a happy two days they were.

It is also worth noting that Chris Culliver netted himself $40,000 for his appearance – more than a lot of my friends earn in an entire year. I guess homophobia does pay after all. I hate it when life works out like that.

Darwin Day 2013

February 12th, 2013 | Life

charles-d

Happy Darwin Day! To celebrate, why not attend a talk by Professor Steven French of the University of Leeds, entitled “Scientific Theory as Art”. Full details.

The Impatient Optimist

February 11th, 2013 | Religion & Politics

Recently, Bill Gates delivered the 2013 Richard Dimbleby Lecture, in which he discussed the struggle to eradicate polio from the world.

The good news is, that it is now only endemic in three countries – Afghanistan, Pakistan and Nigeria.

This in itself is no small achievement – polio is a disease that takes weeks to diagnose, which means the percentage of the population you need to immunise is higher, in this case 95%.

Take a country like India, with over a billion people – 75,000 new babies are born every day, and each of them requires several rounds of immunisation. That means that you need 200,000 vaccines per day, that need to be taken to rural communities, while being refrigerated, often that need to be carried for miles on foot by health workers. No wonder it took a staggering 2,000,000 people working on the programme – but they did it!

Unfortunately, you can’t stop fighting it until it’s eradicated, but with only three countries to go, the plan is to read that milestone by 2018. But more than being about one single disease, Gates points out…

Polio eradication is a proving ground, a test. It will reveal what human beings are capable of, and suggest how ambitious we can be about the future.

Together, we can achieve great things.

The Smashing Pumpkins – Oceania

February 10th, 2013 | Reviews

As a child, I never had a chance. By the time I was 14, soon to discover what an amazing band The Smashing Pumpkins were, they had already split up. But, in 2006, front man Billy Corgan and drummer Jimmy Chamberlin reformed the band with a rotating cast of extras to bring out a new album, Zeitgeist.

Many people weren’t expecting good things, with only two of the original band members together. But this was nieve, as Billy Corgan is so much the heart and soul of the band – indeed, in the early days, Corgan would actually play all of the guitar and bass parts himself, putting Chamberlin’s drums over the top, and ignoring the contribution of the other band members so that the album fitted together the way he wanted.

When Zeitgiest was released in 2007, I wasn’t that impressed though. It was OK, but it didn’t really capture my ears – I’ve listened to it a couple of times since with no strong desire to keep going back to it.

Their new album, Oceania, released last year, is no such disappointment however. Bringing back musical memories of their most successful days, the album is everything you want from a Pumpkins record – dark, soulful, and with a hint of fun.

Installing Imagick on Ubuntu 12

February 10th, 2013 | Programming, Tech

To install Imagick, you would normally do this via PECL.

sudo pecl install imagick

However, when trying this on Ubuntu 12.04 LTS, you may get an error similar to the following.

checking ImageMagick MagickWand API configuration program...
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program

You can resolve this by installing a few extra packages.

sudo apt-get install libmagickwand-dev libmagickcore-dev

Now try re-running the original command and it should be successful.

Typo

February 9th, 2013 | Religion & Politics

Chris Ward tweeted this picture.

BCQIpAzCAAAnm2G

The Good Samaritan

February 8th, 2013 | Humanism

Last week at Atheist Society, retired Religious Education teacher Margaret Bramham presented a talk on the Gospels. It was an interesting talk, though I couldn’t help thinking about this Mitchell & Webb sketch.