Andy Smith wrote:

On Wed, Jul 12, 2006 at 02:42:33PM +0100, Stuart Bird wrote:
I have input the following, in sequence,  via a mysql shell:

/CREATE TABLE ftpd (
User varchar(16) NOT NULL default '',
status enum('0','1') NOT NULL default '0',
Password varchar(64) NOT NULL default '',
Uid varchar(11) NOT NULL default '-1',
Gid varchar(11) NOT NULL default '-1',
Dir varchar(128) NOT NULL default '',
ULBandwidth smallint(5) NOT NULL default '0',
DLBandwidth smallint(5) NOT NULL default '0',
comment tinytext NOT NULL,
ipaccess varchar(15) NOT NULL default '*',
QuotaSize smallint(5) NOT NULL default '0',
QuotaFiles int(11) NOT NULL default '0',
PRIMARY KEY (User),
UNIQUE KEY User (User)
) TYPE=MyISAM;
/

/The problem is, every time I enter the last command ( ie ) TYPE=MyISAM;), mysql returns apparently random syntax errors concerning the strings enterd in the list above it. If I then quit and check the database via phpmyadmin, no table has been created. I have tried several variations without success.

Works for me:

mysql> CREATE TABLE ftpd (
   -> User varchar(16) NOT NULL default '',
   -> status enum('0','1') NOT NULL default '0',
   -> Password varchar(64) NOT NULL default '',
   -> Uid varchar(11) NOT NULL default '-1',
   -> Gid varchar(11) NOT NULL default '-1',
   -> Dir varchar(128) NOT NULL default '',
   -> ULBandwidth smallint(5) NOT NULL default '0',
   -> DLBandwidth smallint(5) NOT NULL default '0',
   -> comment tinytext NOT NULL,
   -> ipaccess varchar(15) NOT NULL default '*',
   -> QuotaSize smallint(5) NOT NULL default '0',
   -> QuotaFiles int(11) NOT NULL default '0',
   -> PRIMARY KEY (User),
   -> UNIQUE KEY User (User)
   -> ) TYPE=MyISAM;
Query OK, 0 rows affected, 1 warning (0.22 sec)

What errors are you seeing exactly?

Cheers,
Andy

------------------------------------------------------------------------

_______________________________________________
Peterboro mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/peterboro

Hi Andy

Works for me:
Oh dear ! That probably means I have a bigger issue to sort out, I thought it was just my syntax !!!

The errors are odd, in as much as they appear to be random. They all relate to syntax errors in the lines entered before I enter the TYPE command. I get no reported errors until that point. I cannot post the exacy errors as I am away from the machine at the moment, however, the errors are along the line of:

"you have a syntax error in line ## 'User varchar(16) NOT NULL default '',' please refer to mysql manual etc etc... (even though, as you have proved the syntax is correct)

If I re-enter the TYPE command I get the same error, but relating to another line. Also, if I scrap the whole d'base and start again the same errors appear at the same point.

I have tried it four or five times now. Same result each time.

Stu

_______________________________________________
Peterboro mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/peterboro

Reply via email to