<p>Assuming you're running Craft version 3.4.27 or earlier, most likely your web host has updated MySQL and you're running into this issue: <a href="https://github.com/craftcms/cms/issues/6379" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/6379</a></p>
<p>The fix is to update Craft to 3.4.28 or later (for security reasons; ideally to the latest 3.9.x release or even to Craft 4 as Craft 3 is EOL as of April 2024). Alternatively, you'll need to ensure MySQL is using a version prior to 8.0.21, or move to MariaDB.</p>

CC BY-SA 4.0
2024-07-03T23:23:48.067Z
Hi Mats,

That makes sense. My hosting provider swore that they hadn't changed anything on the server when I contacted them about this the other day, but I bet they have (ggrrhh). I'll check it out tomorrow (it's gone midnight here in the UK).

Thanks

Philip
Philip Buckley
CC BY-SA 4.0
2024-07-04T21:43:15.953Z
Hi Mats, you were EXACTLY right. My hosting provider had (without warning) updated MySQL to 8.0.36. The site is now working again. Again, thankyou very much – there’s no way I would have been able to figure the problem out on my own. Philip
Philip Buckley
CC BY-SA 4.0
2024-07-06T21:23:29.617Z
@PhilipBuckley Awesome that I could help out! Hope you got it sorted, one way or the other :)
Mats Mikkel Rummelhoff
CC BY-SA 4.0
2024-07-03T21:31:26.837Z
2024-07-03T21:31:26.837Z
Mats Mikkel Rummelhoff
<p>I built a site with Craft 3 in 2018. I have barely touched it since (or worked with Craft, to be honest). The front-end is fine and the end-users have been using it without problem until last week when they contacted me because they suddenly could not login to the back-end. I too cannot login. The login page is showing an Internal Server Error message. I have temporarily set ENVIRONMENT=“dev” in the .env file to see what the error message is. What I am seeing is:</p>
<pre><code>PHP Notice – yiibaseErrorException
    
Undefined index: constraint_name
    
1. in /home/customer/www/cornerstonebooks.co.uk/vendor/yiisoft/yii2/db/mysql/Schema.php   at line 387 
</code></pre>
<p>etc. etc.</p>
<p>I have absolutely no idea what that means or, more importantly, how to troubleshoot/fix it. Any suggestions as to how to go about fixing the problem, would be gratefully received.</p>
<p>Thanks</p>
<p>Philip</p>

<craft3><error>
Craft 3 site – users suddenly cannot login to back-end
# Craft 3 site – users suddenly cannot login to back-end

(Asked by: username_0 on 2024-07-03)

I built a site with Craft 3 in 2018. I have barely touched it since (or worked with Craft, to be honest). The front-end is fine and the end-users have been using it without problem until last week when they contacted me because they suddenly could not login to the back-end. I too cannot login. The login page is showing an Internal Server Error message. I have temporarily set ENVIRONMENT=“dev” in the .env file to see what the error message is. What I am seeing is:
PHP Notice – yiibaseErrorException
    
Undefined index: constraint_name
    
1. in /home/customer/www/cornerstonebooks.co.uk/vendor/yiisoft/yii2/db/mysql/Schema.php   at line 387 

etc. etc.
I have absolutely no idea what that means or, more importantly, how to troubleshoot/fix it. Any suggestions as to how to go about fixing the problem, would be gratefully received.
Thanks
Philip

**Tags:** craft3, error

---

## 1 answers

### Answer by username_1 on 2024-07-03. Score: 1 | Accepted answer

Assuming you're running Craft version 3.4.27 or earlier, most likely your web host has updated MySQL and you're running into this issue: <https://github.com/craftcms/cms/issues/6379>

The fix is to update Craft to 3.4.28 or later (for security reasons; ideally to the latest 3.9.x release or even to Craft 4 as Craft 3 is EOL as of April 2024). Alternatively, you'll need to ensure MySQL is using a version prior to 8.0.21, or move to MariaDB.

> **Comments:**
> **username_0**: Hi Mats,  That makes sense. My hosting provider swore that they hadn't changed anything on the server when I contacted them about this the other day, but I bet they have (ggrrhh). I'll check it out tomorrow (it's gone midnight here in the UK).  Thanks  Philip  
> **username_0**: Hi Mats, you were EXACTLY right. My hosting provider had (without warning) updated MySQL to 8.0.36. The site is now working again. Again, thankyou very much – there’s no way I would have been able to figure the problem out on my own. Philip  
> **username_1**: @PhilipBuckley Awesome that I could help out! Hope you got it sorted, one way or the other :)  

---

