I used to run MT 2.64 and decided to start a new blog on the same server and trash the old 2.64 version and start with 3.11. So I went ahead and cleaned out the old directories and files. Installed the new version on the server and tried to execute the mt-load.cgi file. It gave me an error along the lines of “Table ‘mt_author’ already exists at something.com/cgi-bin/mt-load.cgi line 55.”

I figured this had to do with the fact that the old 2.64 data was still in the MySql database and the mt-load script didn’t like that. I’m far from experienced with MySql, but I went off to find a way to empty that database out.

I ended up installing PuTTY to SSH into host’s server. I then, for the first time ever, figured out how to log on to the MySql database using this command-line: “mysql -u userid -p”. This took me to the mysql> prompt. Then I did a “show databases;” to get a list of all the databases, found mine, and then did a “connect mydatabasename;” Followed that up by doing a “show tables;” and then dropped each one of those tables by doing “drop table tablename;” for each. There’s probably a faster way to do them all bulk, but I didn’t look too hard.

Once they were all cleared out, I ran mt-load.cgi once again and everything was happy. I’m posting this so I remember what I did in the future if I ever need to do this again and for anyone else who might google on to this trying to figure it out themselves. I sure searched quite a bit and came up empty, so this may be of help to someone out there.

[Originally posted on my previous blog on 9/16/2004]