# Concrete 5.6 and MySQL8 \[solved\]

**URL:** <https://forums.concretecms.org/t/concrete-5-6-and-mysql8-solved/7024>\
**Category:** Developing with Concrete\
**Created:** [February 27, 2024, 4:38am UTC](https://forums.concretecms.org/t/concrete-5-6-and-mysql8-solved/7024 "2024-02-27T04:38:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jb1](https://forums.concretecms.org/user_avatar/forums.concretecms.org/jb1/32/4935_2.png) [@jb1](https://forums.concretecms.org/u/jb1)\
**Post date:** [February 27, 2024, 4:38am UTC](https://forums.concretecms.org/t/concrete-5-6-and-mysql8-solved/7024/1 "2024-02-27T04:38:10Z")

</div>

My web hosting company is forcing me to move to a new server and my Concrete 5.6 sites were breaking on the new server running MySQL8. It seems a few other users are in the same position. Fortunately, my hosting company found an elegant solution (big thanks to A2 Hosting!) to make the migration smoother. I wanted to share it here. It involves changing all the SQL statements that include the reserved word “groups” by wrapping them in ticks. All you need access to is SSH on your server. If you can’t do this yourself, then just send a ticket to your hosting company and link to this post and they will understand what to change for you.

## Firstly, it will find a list of files that contain the db variable and word “groups”:

[SERVERNAME public\_html]$ grep -Rl “$db.\*Groups” .  
./updates/concrete5.6.3.1/concrete/helpers/concrete/upgrade/version\_560.php  
./updates/concrete5.6.3.1/concrete/core/models/userinfo.php  
./updates/concrete5.6.3.1/concrete/core/models/search/group.php  
./updates/concrete5.6.3.1/concrete/core/models/permission/keys/custom/access\_user\_search.php  
./updates/concrete5.6.3.1/concrete/core/models/permission/access/entity/types/group.php  
./updates/concrete5.6.3.1/concrete/core/models/permission/access/entity/types/group\_combination.php  
./updates/concrete5.6.3.1/concrete/core/models/permission/access/entity/types/group\_set.php  
./updates/concrete5.6.3.1/concrete/core/models/group\_set.php  
./updates/concrete5.6.3.1/concrete/core/models/user.php  
./updates/concrete5.6.3.1/concrete/core/models/groups.php  
./updates/concrete5.6.3.2/concrete/helpers/concrete/upgrade/version\_560.php  
./updates/concrete5.6.3.2/concrete/core/models/userinfo.php  
./updates/concrete5.6.3.2/concrete/core/models/search/group.php  
./updates/concrete5.6.3.2/concrete/core/models/permission/keys/custom/access\_user\_search.php  
./updates/concrete5.6.3.2/concrete/core/models/permission/access/entity/types/group.php  
./updates/concrete5.6.3.2/concrete/core/models/permission/access/entity/types/group\_combination.php  
./updates/concrete5.6.3.2/concrete/core/models/permission/access/entity/types/group\_set.php  
./updates/concrete5.6.3.2/concrete/core/models/group\_set.php  
./updates/concrete5.6.3.2/concrete/core/models/user.php  
./updates/concrete5.6.3.2/concrete/core/models/groups.php  
./updates/concrete5.6.3.1b/concrete/helpers/concrete/upgrade/version\_560.php  
./updates/concrete5.6.3.1b/concrete/core/models/userinfo.php  
./updates/concrete5.6.3.1b/concrete/core/models/search/group.php  
./updates/concrete5.6.3.1b/concrete/core/models/permission/keys/custom/access\_user\_search.php  
./updates/concrete5.6.3.1b/concrete/core/models/permission/access/entity/types/group.php  
./updates/concrete5.6.3.1b/concrete/core/models/permission/access/entity/types/group\_combination.php  
./updates/concrete5.6.3.1b/concrete/core/models/permission/access/entity/types/group\_set.php  
./updates/concrete5.6.3.1b/concrete/core/models/group\_set.php  
./updates/concrete5.6.3.1b/concrete/core/models/user.php  
./updates/concrete5.6.3.1b/concrete/core/models/groups.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/helpers/concrete/upgrade/version\_560.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/core/models/userinfo.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/core/models/search/group.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/core/models/permission/keys/custom/access\_user\_search.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/core/models/permission/access/entity/types/group.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/core/models/permission/access/entity/types/group\_combination.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/core/models/permission/access/entity/types/group\_set.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/core/models/group\_set.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/core/models/user.php  
./updates/concrete5.6.3.5\_remote\_updater/concrete/core/models/groups.php  
./updates/concrete5.6.4.0/concrete/helpers/concrete/upgrade/version\_560.php  
./updates/concrete5.6.4.0/concrete/core/models/userinfo.php  
./updates/concrete5.6.4.0/concrete/core/models/search/group.php  
./updates/concrete5.6.4.0/concrete/core/models/permission/keys/custom/access\_user\_search.php  
./updates/concrete5.6.4.0/concrete/core/models/permission/access/entity/types/group.php  
./updates/concrete5.6.4.0/concrete/core/models/permission/access/entity/types/group\_combination.php  
./updates/concrete5.6.4.0/concrete/core/models/permission/access/entity/types/group\_set.php  
./updates/concrete5.6.4.0/concrete/core/models/group\_set.php  
./updates/concrete5.6.4.0/concrete/core/models/user.php  
./updates/concrete5.6.4.0/concrete/core/models/groups.php  
./concrete/models/userinfo.php  
./concrete/models/search/group.php  
./concrete/models/page.php  
./concrete/models/user.php  
./concrete/models/area.php  
./concrete/models/task\_permission.php  
./concrete/models/groups.php

–

And then run this grep command:

[SERVERNAME public\_html]$ grep -Rl “$db.\*Groups” . | xargs -d ‘\n’ -I {} sed -i “s/\bGroups\b/`Groups`/g” {}

That’s it!

As always, it’s best to make a backup copy of the site files and MySQL database before doing any substantial change like this.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![hutman](https://forums.concretecms.org/user_avatar/forums.concretecms.org/hutman/32/6198_2.png) [@hutman](https://forums.concretecms.org/u/hutman)\
**Post date:** [February 27, 2024, 2:20pm UTC](https://forums.concretecms.org/t/concrete-5-6-and-mysql8-solved/7024/2 "2024-02-27T14:20:01Z")

</div>

If you grab the latest version of 5.6.4.0 from GitHub it has fixes for MySQL 8 already done - [GitHub - concretecms/concrete5-legacy: Legacy repository for concrete5](https://github.com/concretecms/concrete5-legacy/tree/master)

---

<div class="post-metadata">

**Author:** ![jb1](https://forums.concretecms.org/user_avatar/forums.concretecms.org/jb1/32/4935_2.png) [@jb1](https://forums.concretecms.org/u/jb1)\
**Post date:** [February 28, 2024, 3:01am UTC](https://forums.concretecms.org/t/concrete-5-6-and-mysql8-solved/7024/3 "2024-02-28T03:01:13Z")

</div>

Ah, good to know! I had some customisations done on my install, so the update would have overwritten those.
