> According to the manual, a database name can be up to 64 characters
> long (ch. 7):
> >A database, table, index or column name can be up to 64
> characters long. An
> >alias name can be up to 256 characters long.
> ??? The Db field is not 32 characters long in any grant table. How
> do you get that figure? The field is 64 characters long in both the
> db and host tables:
Hmmm. Maybe I posted a little hastily (before looking it up in the manual).
Sorry. I got that figure by doing a dump of the mysql database:
mysqldump mysql > mysql.db
Here is part of the file:
CREATE TABLE db (
Host char(60) DEFAULT '' NOT NULL,
Db char(32) DEFAULT '' NOT NULL,
User char(16) DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User),
KEY User (User)
> The Db field is 60 characters long in the columns_priv and
> tables_priv tables as a compromise due to the maximum size of
> an index row being 256 bytes.
Thanks. That makes sense now.