I found that database error occurs when I try to search keywords that is not the title of wiki pages. Database Error Message on Special:Search pages One of my wiki user also informed that the issue is particular and his wiki is OK.
I checked the local javascript sources but they don't seem to modify Special:Search pages and the issue is certainly not related to skins. I think that Miraheze doesn't support CirrusSearch Extension now, which my wiki supported, and the issue may be related to this extension.