View Full Version : Deleting tables from database
joeholmes
12-23-04, 12:40 PM
An expert in the MovableType support forum suggested that I need to remove some entries from my database file in order to resolve a problem I'm having with a MovableType plug-in.
(The MT-Blacklist installation gives me an error: "Table 'mt_ext_bl_group' already exists at mt-bl-load.cgi line 233")
Here's what he wrote:
-----
delete all the MT-Blacklist related files from your database; that is remove the tables that start with mt_ext_bl_xxxxx (usually there are seven of them) and then remove all rows in the mt_plugindata table in your database that mention MT-Blacklist. Once those are gone you can then try installing MT-Blacklist from scratch as a fresh installation (and run mt-bl-load.cgi).
-----
How do I do that? Help!
-=-Joe
joeholmes
12-23-04, 01:03 PM
Okay, let me add that I've gotten as far as logging into my phpmyadmin where I can actually see the tables that the MT guy referred to. I'm hesitating because I don't know if the "drop" command is the same as delete the table.... Any documentation? Or help here? Thanks.
joeholmes
12-23-04, 01:11 PM
And let me add that I read the documentation and see that "drop" a table does equal "delete" a table.
So far so good. This is turning into more of a diary than a question...
-=-Joe
tbonekkt
12-23-04, 01:13 PM
You're correct. Dropping a table does delete it.
joeholmes
12-23-04, 01:27 PM
Damn, now a new hassle. I successfully deleted the tables, had mt-blacklist working for a minute, and then...got this error: "Byte order is not compatible at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 363, at /www/s/t/streetnine.com/htdocs/movabletype/lib/MT/PluginData.pm line 28".
Arrgghh! Anybody have a clue???
-=-Joe
joshuamc
12-23-04, 03:01 PM
The good news: Your database problem is resolved...
The bad news...there is none! The resolution is here:
http://textdrive.com/support/?_a=knowledgebase&_j=questiondetails&_i=18
joshuamc
12-23-04, 03:01 PM
I'll go ahead and paste it here for all to see:
Perl 5.8.4 has a default byte order that is different from previous versions.
You need to add the following after line 9 of lib/MT/PluginData.pm
begin {
$Storable::interwork_56_64bit = 1;
}
joeholmes
12-23-04, 03:20 PM
Thanks for that pointer! I did paste in that extra code, but that produces a new error when I try to run the cgi:
An error occurred: syntax error at /www/s/t/streetnine.com/htdocs/movabletype/lib/MT/PluginData.pm line 17, near "use MT::Object" Compilation failed in require at /www/s/t/streetnine.com/htdocs/movabletype/lib/MT/Plugin.pm line 58. BEGIN failed--compilation aborted at /www/s/t/streetnine.com/htdocs/movabletype/lib/MT/Plugin.pm line 58. Compilation failed in require at lib/Blacklist/Plugin.pm line 14. BEGIN failed--compilation aborted at lib/Blacklist/Plugin.pm line 14. Compilation failed in require at lib/Blacklist/App.pm line 18. BEGIN failed--compilation aborted at lib/Blacklist/App.pm line 18. Compilation failed in require at lib/Blacklist/App/CMS.pm line 17. BEGIN failed--compilation aborted at lib/Blacklist/App/CMS.pm line 17. Compilation failed in require at mt-blacklist.cgi line 39.
Looks to me like I may have pasted at the WRONG line 9 -- no, seriously, I counted nine lines from the top of the doc, but that may not be the official "line 9" of the code. Here's where I pasted:
-----
# Copyright 2001-2004 Six Apart. This code cannot be redistributed without
# permission from www.movabletype.org.
#
# $Id: PluginData.pm,v 1.4 2004/04/29 02:42:57 ezra Exp $
package MT::PluginData;
use strict;
use Storable qw( freeze thaw );
begin {
$Storable::interwork_56_64bit = 1;
}
use MT::Object;
@MT::PluginData::ISA = qw( MT::Object );
__PACKAGE__->install_properties ({
columns => [
'id', 'plugin', 'key', 'data',
],
indexes => {
plugin => 1,
key => 1,
},
datasource => 'plugindata',
primary_key => 'id',
});
sub data {
my $data = shift;
$data->column('data', freeze(shift)) if @_;
thaw($data->column('data'));
}
1;
__END__
-----
Any suggestions?? Thanks again for all the help.
-=-Joe
joeholmes
12-23-04, 03:35 PM
To make sure the subject line matches the latest error, I've started a new thread titled "Byte order is not compatible at blib/lib/Storable" since that's what we're now dealing with, not table deletion.
back to the original question,
I dropped the tables, but they keep re-appearing!
Help!
Croc Hunter
7-9-05, 02:51 AM
back to the original question,
I dropped the tables, but they keep re-appearing!
Help!
If they are re-appering then I'd say you have not dropped them.
To drop tables:
Login to https://phpmyadmin.powweb.com
Click on the name of your database on left. Wait until all tables are displayed.
On the right, Checkmark each box for table/s you want dropped (To drop all tables scroll to bottom and click "Check all").
Next to "Check All /Uncheck All / Check overheaded" from the drop down box select Drop.
JimMiles
7-15-05, 11:38 AM
thanks, i fixed it before you could reply. i don't know exactly what i did, but i had to go through about 5-6 steps to finally do it. Intuitive, this is not! Oh well, I guess user-friendliness is a relative term, eh?
If I were you I would give up on Movable Type and switch to something better... like WordPress ;)
rbradscott
7-15-05, 02:00 PM
Wow, joshuamc, that's some honest-to-goodness, detailed, directed assistance, that you clearly put a little work into! Thanks for helping, I've been working a bit with mySQL tables via phpMyAdmin and find these kinds of details quite valuable. And I like your sense of humor, FWIW.
I love... L.A.!
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.