Error: Server Internal error – Incorrect usage of UNION and LIMIT. SQL error prevents logging on to the administration system.

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=’’ 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, as command_line, NULL as validity, NULL as suspended FROM subaccounts WHERE subaccounts.username = ‘’ 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.