Cannot edit an existing table

456 views
Skip to first unread message

Key

unread,
Dec 23, 2010, 10:43:48 PM12/23/10
to Sequel Pro
Hello,
I just started using Sequel Pro a few days ago and I am having
trouble changing the structure of my tables. I am using a local MAMP
database and I had it set up before using this program. When I try to
change the structure of a table that was not created in Sequel Pro,
but in phpMyAdmin, it gives me this error: "MySQL said: Incorrect
arguments to DATA DIRECTORY". It does not do this on a table that was
created in the program, only ones that were created outside the
program.
I have no trouble changing the information and adding records to
any table so I am not sure what the problem would be.

Let me know if you need more information.

Thanks,
Key

Rowan Beentje

unread,
Dec 24, 2010, 5:44:37 AM12/24/10
to seque...@googlegroups.com
Hi Key,

Are you using partitioned tables or indexes?

This is probably something we're not preserving correctly in Sequel Pro at the moment - if there's any chance you could send me your CREATE TABLE syntaxes directly, we can probably get that sorted for the next version...

Thanks,
Rowan

> --
> You received this message because you are subscribed to the Google Groups "Sequel Pro" group.
> To post to this group, send email to seque...@googlegroups.com.
> To unsubscribe from this group, send email to sequel-pro+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sequel-pro?hl=en.
>

Key

unread,
Dec 24, 2010, 6:54:49 PM12/24/10
to Sequel Pro
I have only just recently started to learn more about mysql, so I am
not sure if I am using partitioned tables or indexes or not. When I
created the database, I just created the tables through the phpMyAdmin
interface and I did not do anything special, just added the fields I
needed and created the table.

The create table syntax for one of my tables is as follows:

CREATE TABLE `pages` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pageID',
`title` varchar(30) NOT NULL COMMENT 'title for page',
`alias` varchar(30) NOT NULL COMMENT 'alias for page',
`content` mediumtext NOT NULL,
`showTitle` enum('Y','N') NOT NULL,
`template` varchar(30) NOT NULL DEFAULT 'default',
`publish` enum('Y','N') NOT NULL,
`added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP,
`addedBy` int(11) NOT NULL,
`revisions` int(11) NOT NULL COMMENT '# of times modified',
`modified` date DEFAULT NULL,
`modifiedBy` int(11) DEFAULT NULL COMMENT 'ID of user that last
modified',
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `alias` (`alias`)
) ENGINE=MyISAM AUTO_INCREMENT=50 DEFAULT CHARSET=latin1 DATA
DIRECTORY='./wwtweb_webstreet/' INDEX DIRECTORY='./wwtweb_webstreet/';

Key

unread,
Dec 24, 2010, 7:05:15 PM12/24/10
to Sequel Pro
I don't know if it would be relevant to the issue, but I also keep
getting the following error: "Incorrect key file for table 'users';
try to repair it" I try to repair it, and am told it is corrupt and
then I have to re-build the table. This has happened on two of my
tables in a database that is connected through Sequel Pro. If it is
not related to this problem, I can start another discussion.

Thanks for your help!

On Dec 24, 5:44 am, Rowan Beentje <ro...@beent.je> wrote:

Rowan Beentje

unread,
Jan 3, 2011, 6:11:56 PM1/3/11
to seque...@googlegroups.com
Hi Key,

Thanks for the extra info.

There is something odd here - when you're changing the structure, all that gets sent is an ALTER TABLE command with only the details needed to change, for example a row edit. So the table setup shouldn't matter. That and the key file errors makes me suspect that when the tables were created, phpMyAdmin specified an incorrect storage directory.

This can be seen in the CREATE TABLE query you selected as:

... DATA DIRECTORY='./wwtweb_webstreet/' INDEX DIRECTORY='./wwtweb_webstreet/';

Are those paths correct and writable?

On the other hand, you say you can add records to any table, so I'm not entirely sure that that's the problem. But I don't think it's default behaviour for phpMyAdmin to specify directories, and the incorrect key file error is very suspicious (that's an error thrown by mysql).

--Rowan

Key

unread,
Jan 4, 2011, 4:59:28 PM1/4/11
to Sequel Pro
I did not add the directory myself. All I have ever used to make
tables is the phpMyAdmin interface. wwtweb_webstreet is the name of
the database, so I would assume that phpMyAdmin made that directory
when I made the table. I ended up having to re-create that particular
table that I gave the create code for, and I just redid the export and
that line is not there - so maybe that was the problem. Is there
anything that would have made that line be added? I don't even know
what it does - so I didn't add it myself. Could it be a different
phpMyAdmin version that does it? because I am not sure if the version
I have on my production server and my localhost are the same or not -
and if I loose a table on my local machine I will export it from the
production server's database.

That is weird though!
Reply all
Reply to author
Forward
0 new messages