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

Michael Stauber mstauber at blueonyx.it
Sat Oct 11 20:09:36 -05 2014


Hi Maurice,

>> I'll look into it and will try to find a fix.
>
> Thanks!

No problem. I just published a fix for this to the YUM repositories for
all BlueOnyx versions.

In the past the MySQL database & user creation was handled by the PHP
pages of the MySQL UI-Extension. Which never was very smart to begin with.

So I offloaded that to Perl Handlers that are triggered on the
respective CODB transactions. There is also a Handler that checks if a
database and/or user with that given name is already present. If so, the
GUI is prevented from running the database & user create transaction and
matching error messages are shown in the GUI. Messages like "There is
already a database with that name." or "There is already a database user
with that name."

Additionally I changed the way how databases and MySQL users are named.
In the past it used to be this:

User:	siteX
DB:	siteX_db

Which created a nice chaos when the Vsites were cmuImported onto another
server, where they might end up with different siteX group ID's. Then
you would have (for example) a "site2" that could have the MySQL
database user "site44" and the DB "site44_db".

To prevent this, the new naming scheme is this:

User:	vsite_ + 7 character random alpha-numerics
DB:	username + _db

Example:

User:	vsite_S6kZqEO
DB:	vsite_S6kZqEO_db

If you have sites that already have a MySQL database with the old naming
scheme, then it will continue to work for them. No worries. This will
just affect new sites or sites where you enable MySQL freshly.

Additionally: When you create a new Vsite, you can already go ahead and
directly tick the checkbox for "Enable MySQL", because the MySQL
username, password and DB name are already filled in with the new scheme.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list