Here is a simplified query:
============
SELECT fcs.SetID AS ID, fcs.Name AS DocTray, fc.name AS FileCabinet, fcs.settings, r.name
    FROM DWFCSettings fcs
    INNER JOIN DWFileCabinet fc ON fcs.settings.value('(/WebBasketSettings/@AssignedFileCabinetGuid)[1]', 'varchar(50)') = fc.Guid
    INNER JOIN DWFCSettingsToFCProfile fcsp ON fcs.setid = fcsp.setid
    INNER JOIN DWFCProfile fcp ON fcsp.fpid = fcp.fpid
    INNER JOIN DWFCProfileToRole fcpr ON fcsp.fpid = fcpr.fpid
    INNER JOIN DWRoles r ON fcpr.rid = r.rid
    WHERE UPPER(fcs.Type) LIKE '%WEBBASKETSETTINGS%'
=============
It still needs to parse the "settings" field, so still may not work in LySQL. But I don't know a way around it, as the link from tray to cabinet is buried in that XML field (which seems pretty silly). And you need to know the cabinet in order to get permissions, though I may be reading the data model incorrectly (and there might be another way).
In any case, I give a big +1 to needing better Document Tray administration and better control of names and permissions visibility. These dependencies can get you in a real bind, real fast.
 
Thanks,
Joe Kaufman