[BlueOnyx:16168] Re: Existing database overwritten by GUI

Michael Stauber mstauber at blueonyx.it
Tue Oct 14 10:26:04 -05 2014


Hi Maurice,

> Oh, cr*p! 99% of my database and mysqlusernames have a minus in it :(
> Is there a good reason to not support the minus?
> Or can I temporarily disable the check or the unsupported status of the 
> minus?

I forbade the minus for consistency reasons with class names and key
names, which don't allow to have a minus in them. Value fields may
actually contain it.

Ok, so let us do this:

Please edit /usr/sausalito/schemas/base/mysql/MYSQL_Vsite.schema and
scroll to the bottom of it.

There you find these two lines:

<typedef name="mysqlusername" type="re"
data="^[A-Za-z0-9][A-Za-z0-9_%]{1,15}$" />
<typedef name="mysqldatabase" type="re"
data="^[A-Za-z0-9][A-Za-z0-9_%]{1,63}$" />

Change them to this:

<typedef name="mysqlusername" type="re"
data="^[A-Za-z0-9][-]{0,4}[A-Za-z0-9_%]{1,15}$" />
<typedef name="mysqldatabase" type="re"
data="^[A-Za-z0-9][-]{0,8}[A-Za-z0-9_%]{1,63}$" />

Save the changes and rehash CCEd:

/sbin/service cced.init rehash

Afterwards up to four "-" are allowed in MySQL usernames and up to eight
in database names. As the MySQL username has a maximum length of 15
characters we don't want to allow to many minus in it, or we might end
up with a username with 15 minuses. :p

For consistency I will also publish this as an update to base-mysql, so
you won't loose that change during the next update.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list