This occurs if you have installed a non-compatible version of MySQL (i.e. v5.7 or above) that requires that parentheses are used when using LIMIT in a query with UNION.
An example of this error could be:
SELECT username,password,userid,lictype,name,email,interop_enabled,command_line,validity,suspended FROM writerusers WHERE username=’email@example.com’ AND password=’th75jd889jmn32ws871qw9′ LIMIT 1 UNION SELECT subaccounts.username as subUser,subaccounts.password as subPassword, subaccounts.userid as subUserid, ‘sub’ as lictype, NULL as name, NULL as email, subaccounts.permissions as interop_enabled, subaccounts.id as command_line, NULL as validity, NULL as suspended FROM subaccounts WHERE subaccounts.username = ‘firstname.lastname@example.org’ AND subaccounts.password = ‘th75jd889jmn32ws871qw9’ LIMIT 1
To solve this install MySQL version 5.6 or below. The Safeguard Administration system supports MySQL version 5.1 to 5.6.