Archive for the ‘Life’ Category

Copernicus Day

Tuesday, February 19th, 2013 | Life

Copernicus

Happy Copernicus Day!

Data missing from MySQL replication due to column mismatch

Saturday, 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

Friday, 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”.

Super Bowl

Wednesday, 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

Tuesday, 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.

Lunching at Fazenda

Tuesday, January 29th, 2013 | Life

Last Friday, we headed to Fazenda for lunch.

I’ve never had the lunch time menu before, though I knew to expect a very much cut down version of what they served in the evening. Overall, I thought it was quite disappointing though. Most of the options were not available on the lunch time – indeed, the only steak cut available seemed to be rump, although there might have been sirloin – but nothing beyond that. I was expecting the fancy stuff to be reserved for the evening session, but I was hoping there would at least be some good choice of standard steak cuts. Apparently not.

Restarting Apache on Gentoo

Tuesday, January 29th, 2013 | Life, Tech

Normally, you can restart Apache using the restart command for the init.d script.

/etc/init.d/apache2 restart

However, you may encounter the following error.

chris@server /root $ sudo /etc/init.d/apache2 restart
 * Stopping apache2 ...[ ok ]
 * Starting apache2 ...
 * start-stop-daemon: /usr/sbin/apache2 is already running 

This is due to a bug in the init.d script. You can resolve this with a one line change.

vim /etc/init.d/apache2

Change line 105 for the one below (they should look very similar).

while ( test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \

Save it and run the restart command again to check it has worked.

chris@server /root $ sudo /etc/init.d/apache2 restart
 * Caching service dependencies ...                                                                              [ ok ]
 * Stopping apache2 ...                                                                                          [ ok ]
 * Starting apache2 ...

If you get an output like the above, you’ll know it’s worked.

It’s gone!

Wednesday, January 23rd, 2013 | Life

Last Friday, we went for dinner at Chaophraya.

However, to my horror, I found they had removed their Thai curry, in a Yorkshire Pudding, on a steak dish from the menu! This, of course, was the greatest food ever known to man, and as such I will be writing a strongly worded letter to the management, insisting the dish is reinstated. Anyone who wishes to sign the petition, get in touch.

MaxClients (150) is not an integer multiple

Wednesday, January 23rd, 2013 | Life, Tech

Starting Apache on Gentoo, you may get warnings similar to the following.

chris@server ~/lime $ sudo /etc/init.d/apache2 stop
Password: 
 * Stopping apache2 ...
WARNING: MaxClients (150) is not an integer multiple
 of ThreadsPerChild (35), lowering MaxClients to 140
 for a maximum of 4 child processes,
WARNING: MaxClients (25) must be at least as large
 as ThreadsPerChild (35). Automatically
 increasing MaxClients to 35.                                                                                    [ ok ]
chris@server ~/lime $ sudo /etc/init.d/apache2 start
 * Starting apache2 ...
WARNING: MaxClients (150) is not an integer multiple
 of ThreadsPerChild (35), lowering MaxClients to 140
 for a maximum of 4 child processes,
WARNING: MaxClients (25) must be at least as large
 as ThreadsPerChild (35). Automatically
 increasing MaxClients to 35.

You can resolve these warnings by editing your mpm file and changing ThreadsPerChild so that MaxClients becomes a multiple of it. In this case, setting it to 25 should do the trick.

sudo vim /etc/apache2/modules.d/00_mpm.conf

Change the values and save the file. Now restart Apache and it should stop the warnings.

You could also change MaxClients, but this would only resolve the first warning, and not the second.

Christmas party

Saturday, January 19th, 2013 | Life

Last week, we went out for the Worfolk Limited Christmas party. It was a very small affair – even with all the directors and employees attending, and partners, that still only left myself and Elina. Given the small number, I had decided to hold off until January to avoid large roaming gangs of noisy office employees.

We went to Anthony’s Restaurant, not just because it was located just round the corner, or because it is one of the restaurants in Leeds city centre that I’ve never eaten at but also because of the intriguing possibility of their taster menu.

This was an eight course meal where you don’t know what you’re getting – apparently because the chef just makes it up as they go along – which is brilliant. We ate our way through four starters, two mains and two desserts, along with a home made loaf of bread – each!

It was rather quiet in there – indeed, we had the place to ourselves for the first hour, before two other couples turned up, and that was their entire business for the night. That is simply a cost issue though – it certainly wasn’t because of the food, which did not disappoint.

I have little idea of what I ate in most of the courses, despite an explanation from our waitress. But it was all delicious, if a little rich – by the sixth course, I was starting to think I was on sauce overload. At 10pm, we waddled out of the restaurant, stuffed. My kind of Christmas party.