-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.x]: Cannot install or upgrade DB - encoding issue #14332
Comments
Do you have a |
Ah I guess not, I didn't realise I needed to set this manually. I set it to utf8mb4_unicode_ci and it worked no problem. Thanks for clarifying. |
It looks like MariaDB 11.2+ added the ability to change the default collation associated with a charset: https://mariadb.com/kb/en/setting-character-sets-and-collations/#changing-default-collation Maybe that’s what happened here? Your MariaDB install has |
Actually now I’m really confused.
|
Ah just noticed db.php is setting
Would this cause the issue? |
That wouldn’t explain how it was set to |
I encountered the same issue when trying to upgrade from 4.5 to 5.0.0 (Beta3). Removing the collation from EDIT: I found I didn't set the .env file with the recommended settings (as per here) prior the upgrade. Maybe this could be simplied?
The error reported by the upgrade was:
|
I’m guessing this is related to #14027 which was resolved in 5.0.0-beta.4. @engram-design What version are you on? |
@brandonkelly I was on |
At least in @engram-design’s case, this was caused by |
Craft 5.0.1 is out now with that fix. |
What happened?
Cannot get Craft CMS 5 up and running on my local machine despite using the new DB encoding standard.
Using Mariadb from 11.2.2
Dispite doing this, I get the following message when upgrading or creating a fresh DB.
Caused by: Exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8mb3_unicode_ci' is not valid for CHARACTER SET 'utf8mb4''
Using MariaDB
Craft CMS version
5.0.0 beta 1
PHP version
PHP 8.2.15
Operating system and version
MacOS 14.2 Sanoma
Database type and version
MariaDB 11.2.2
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: