Syntax error or access violation: 1064

I have a site (concrete version 8.2.1) that was running fine on PHP 7.1.

Today the site won’t load and has an error reading:
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

From what I can gather this is a conflict of… ‘MySQL 8 GROUPS is a reserved keyword’
Im not a coder so am completely stuck trying to bring the site back so i can upgrade it. I have tried newer versions of PHP, and also gone back and tried 5.6 but nothing helps.

Can anyone please help me by pointing me to the file or files i need to edit to correct this problem? Would a cean install of core help and if so how do i do that without damaging the site?

Many thanks.

That version of Concrete CMS will not run nicely on MySQL 8, changing the PHP version will not change the MySQL version. Upgrading your site to 8.5.12 would solve this problem, there are a few different methods you can use to upgrade your site - How to Upgrade Concrete CMS

Personally the Command Line method is the most successful but you can choose whatever method you think would be best. If you do it in the Dashboard the risk of exceeding the web server timeout is quite high.

Make sure you do a backup of the database and the application/config directory before you do any updates.

Many thanks for your reply, I do apprecaite your help.
Ive never done anything like SSH so out of my depth with this. Ive only ever used the dashboard which I cant access. I’ve discovered this problem has affected a number of sites I host which have not been upgraded above 8.2.1. Ive been using concrete over 10 years and this is the first time im completely scuppered. I cant believe the developers haven’t provided a work around as this must have hit thousands of people like me who are now lost. Ive read some stuff online which mentions simply uploading an update in the directory and then replacing the core that way. Would that work please?

Just found out my hosting provider dosen’t allow SSH on my plan without upgrading to premium servers which i don’t need. Im starting to feel like dumping concrete and using wordpress instead. Concrete is turning into sand!

Ive tried replacing the core manually using file manager and following the instructions from your link. Nothing changed, so I updated PHP to 7.4.
The site now shows this error:
Whoops \ Exception \ ErrorException (E_COMPILE_ERROR)
Declaration of DoctrineProxies_CG_\Concrete\Core\Entity\Site\Site::clearAttribute($ak) must be compatible with Concrete\Core\Entity\Site\Site::clearAttribute($ak, $doReindexImmediately = true)

This is the site so you can see the whole thing:

You might try clearing the cache - also if you’ve replaced the core you you might want to make sure the update actually ran.

Can you post your environment information from the dashboard? You can find that here:

Ideally it should show the version of Concrete you’re upgrading to (8.5.12 I believe is what you were going for).

You can also check the upgrade page to see if the upgrade is still pending: