SQL Syntax error - core 8.2.1

I have a number of sites that are now displaying a MySQL syntax error.
The sites are running core 8.2.1 and were working fine using PHP 5.6 or 7.1, but are now broken.
This is the error:
An exception occurred while executing 'select * from Groups where gID = ?' with params ["1"]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Groups where gID = '1'' at line 1

I do not have access to the dashboard so cannot update the core. I have tried manual updates using concrete [instructions here] (How to Upgrade Concrete CMS) but this did not work.
I do not have SSH access on my servers and do not have the skills anyhow.

Can anyone guide me as to a work-round as my clients are very unhappy (so far 6 websites).
Thanks, Dean.

It sounds like your hosting upgraded to mysql8 (where word Groups started to be considered as reserved keyword).

If you are not able to update Concrete in any way, you should temporarily move site to another server/localhost (with mysql version lesser than 8 or with mariadb) and update it there.

Maybe ask hosting provider if you can choose other version of mysql (but I doubt you can do it).

Not sure at what Concrete version this was fixed though… Hopefully it was 8.x branch. I mostly run sites on mariadb where there is no such problem currently.

Hi Parasek,

Thanks so much for your clear and detailed reply. You are correct about the MySql.
I have managed to somehow bring back most sites by manually trying a variety of core updates till I found one that gave me a dashboard and then go from there.

Some of the sites themes however are now broken because they are not supported by core 9 which is a right pain.

I have one site left that is proving impossible to repair:

Any thoughts much appreciated?

Hi there

I’m new to ConcreteCMS, but that error appears to be related to a column missing (siteTreeID) on table Pages… Can you confirm thar you have that column on this table. Not sure on how ConcreteCMS updates are done but some database migration missing ?



Hi longoj,

Not sure how that works, Assume I can check using phpMyAdmin?

I think the main problem is the core update has not functioned correctly, as it shows this in the error report:
Concrete CMS
Version 9.2.1
Installed Version

Yes,you can see with phpmyadmin or other mysql database browser.

If you have a site backup (files and db), restore it and do the updade again doing a track of possible errors.



Sadly this is about the 4th attempt to update the core. Each time I start with the a backup and have tried updating using versions newer than the original and also tried going straight to 9.2, but in each case I get errors.

Hi @deanhawthorn -

sorry your running into so many snags - can you go ahead and post your environment information here? That’ll help to troubleshoot if there’s an incompatible setting or something causing problems.

It might be that your server has already been updated to MySQL 8? I know some issues with that and older versions of Concrete have been mentioned here:

So might be such that if you can get the sites in an environment not on MySQL 8, run the updates, then bring them back over, they’ll work?

Edit: Ah I see that’s also your thread, ha. Let me see if I can find other examples.

This might have something to do with it - the table name escaping:

Maybe updating to 8.5.7 first is the trick?

Thanks Evan,

Sorry I don’t understand all that you have posted. I’m not a coder only a designer. I can access PHPmyAdmin but i’m lost in side it.

Sure that’s understandable - essentially it looks like you need to upgrade to 8.5.7 - if you’re looking for someone to work with who can help guide you through the process, I would definitely roll over to Gigs & Jobs - Concrete CMS