MySQL Error 121 During CREATE TABLE

23 Nov 2009

I’m using MySQL to track a pile of data for a project at work. This is a one-off kind of thing that will probably be thrown away after I finish this project, but, I still try to make sure that I have a solid, yet simple, DB design. So, while iterating my way to having just the bits I need, I ran into:

$ >mysql -p database_name <filename.sql
Enter password: ***************
ERROR 1005 (HY000) at line 86: Can't create table database_name.table_name'(errno: 121)

A little Googling lead to several totally different explanations, which are things that I tried. What finally fixed it for me was the advice that I found at [ ]. The SELECT statement for listing the foreign key names didn’t work on MySQL 5.1.40-community on Windows (yes, I know that 5.1.41 is out, I’ll get to it later). However, I did have a couple of tables that were using the same name for a foreign key pointing at the same third table. So, error 121 means a duplicate foreign key name somewhere in the database. Foreign key names must be unique across the entire database, not just within a given table.

WordPress 2.8.6 Upgrade

22 Nov 2009

I did this upgrade almost right when it came out. I simply followed my “normal” upgrade process:

  1. Backup the DB ($ mysqldump -p dbname | gzip >~/backups/$(date -I)-dbname.sql.gz).
  2. Backup the existing directory (# cp -a current-directory directory-outside-of-the-web-space).
  3. Extract the new version on top of the old ($ tar -zxf ~/wordpress-version.tar.gz).
  4. Delete the wp-config-sample.php file.
  5. Fix group ownerships of wp-content/ and sub-directories.
  6. Visit the admin interface.
  7. Fix problems, if there are any.

This time, there was nothing to do for the last two steps. It was all over in just a couple of minutes. Simple as pie.

openSUSE 11.2 Upgrade

21 Nov 2009

I upgraded my HP Compaq 6715b from openSUSE 11.1 to openSUSE 11.2 on Tuesday. There have been a couple of minor bumps since, but all-in-all, I’m pretty happy with the upgrade. Here are some of the things that I’ve seen.
Read the rest of this entry »

How Many of Me

19 Nov 2009

I first saw [ ] a few years ago. There was a conversation the other day that made me think of it again, so I decided to look it up, again.
Logo There are
people with my name in the U.S.A.

How many have your name?

There are only 19 of Monty Peterson in the U.S.

Netflix PS3 Video Streaming

14 Nov 2009

A couple of hours ago, I had my first taste of streaming Netflix on my PS3.

We’ve been getting movies and TV shows from Netflix for over a year. It’s been a great experience for us. We have the 3 discs at once plan, which lets us hang onto some TV series disc for a few days (a couple of weeks) and still keep a couple of movies going back and forth. It’s also possible for us to watch up to 6 different movies in one week, as their turn around time is so fast, it (almost always) only takes 2 days from when I put a disc in the mail until the next one arrives.

Netflix also allows their customers to stream movies and TV shows on their computers, using the Roku player, the LG BD370 Blu-ray player/Netflix streaming device, plus many more. Netflix recently announced that they would be releasing a version for streaming on the Sony PlayStation 3 (a.k.a. PS3).

I’ve added about 20 films to my Instant Streaming Queue in the time I’ve written this article. I think I’ll go watch something.

I got an email from Netflix the other day, announcing that the PS3 disc is now available. It’s free, I simply had to click a couple of links and they sent it out to me. That disc arrived in the mail earlier today. We popped it in, waited for the PS3 to say that it was ready for us to “watch” that disc, and a moment later, we saw cover art for movies and TV shows that are in our Streaming Queue. I selected Season 1 of Quantum Leap and started watching episode 4 (episodes 1-3 are only available on disc). It took about 35-40 seconds for the show to start playing. The playback was flawless. Zero audio or video glitches (I do have a solid 7Mbps DSL line)..

When Maildrop Keeps Filling a Log File

12 Nov 2009

Earlier tonight, Some friends told me that they saw a couple of emails they sent to me bounced back at them. I wrote about what happens “When Maildrop Fills a Log File” on one of my other blogs. Well, it’s happened again a couple of times since then. It’s happened again just a few days ago (ls showed -rw------- 1 lamontp lamontp 51200000 Nov 6 11:19 .maildrop.log).

That’s enough! I’ve had it; I’m going to prevent this from bothering me again.

Well, the right way to fix this is to grab a clue-bat and use it on the Maildrop developer(s) who decided that hardcoding a 50 MB log file size limit into Maildrop was a good idea, until they change their mind(s). Seriously, though, I’m going to send them a patch for this lame duck.

In the meantime, I’ve written rotate-user-maildrop-logs, a shell script to place into your /etc/cron.daily/ (or similar) directory. I am releasing this under the terms of the GNU General Public License, version 3 (a.k.a. GPLv3).

I really like Maildrop. It’s great for me, but it’s not for everyone. For example, my wife isn’t going to sit down and use vi (or any other text editor) to maintain her very own ~/.mailfilter file. For this reason, I will be switching to Sieve in the near future, using the Cyrus IMAP server instead of Dovecot, which I’ve been very happy with.

Is that the time? OK, maybe I’ll have to write that patch for Maildrop on Saturday.

Star Trek: Online Release Date

11 Nov 2009

Get ready; on February 2, 2010, Star Trek: Online arrives in North America and February 5, 2010 is the big day in Europe, according to game developer Cryptic Studios.

Also, system requirements were announced today.

Happy 234th Birthday, US Marine Corps

9 Nov 2009

The date was November 10, 1775. The place was Tun Tavern, Philadelphia, Pennsylvania. The Second Continental Congress had decreed:

That two battalions of Marines be raised consisting of one Colonel, two lieutenant-colonels, two majors and other officers, as usual in other regiments; that they consist of an equal number of privates as with other battalions, that particular care be taken that no persons be appointed to offices, or enlisted into said battalions, but such as are good seamen, or so acquainted with maritime affairs as to be able to serve for and during the present war with Great Britain and the Colonies; unless dismissed by Congress; that they be distinguished by the names of the First and Second Battalions of Marines.

Commandant Samuel Nicholas sat in the tavern, enlisting recruits for the Continental Marines, as they were known back then.

Today, all Marines celebrate November 10th as the Marine Corps Birthday. This year, the Marine Corps Ball of the Commandant of the Marine Corps will take place on Saturday, the 14th. Other posts will celebrate at differing dates throughout the week. One thing always found in common with any Marine Corps Birthday celebration, from the Commandant’s Ball to just two Marines in a foxhole, is the cake. The cake cutting ceremony is very dear to all Marines.

It’s said that it’s a small world in the Corps. Most Marines will serve with others they have known elsewhere at almost every duty station they are ever sent to. This tight-knit “band of brothers” take tradition and honor very seriously.

Semper Fi, Devil Dogs.

Visit for an explanation of the term, “Semper Fidelis,” and its true meaning to Marines.

Star Trek: TNG Movies on BD

1 Nov 2009

On Wednesday evening, I bought the Blu-ray (BD) box set of Star Trek Generations, Star Trek First Contact, Star Trek Insurrection and Star Trek Nemesis at Target (in Centerville) for US$70. The next evening, I was again at Target (looking for a costume item) and walked by an end cap with the same thing for only US$40. I picked it up and confirmed that it was the same thing I had purchased the night before for more money with the employee at the camera counter. He took me to the Customer Service desk, where they confirmed that it wasn’t on clearance and promptly sent US$30 (plus tax) back to my bank account (I had purchased with the debit card).

Even if you don’t have a BD player, I would recommend going down to Target to pick up this set. If you’re a fan, you’ll be glad you saved yourself the bones down the road.

These movies look great on my 42″ 1080P LCD TV, by the way.