-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Recorder error with MySQL 2024.4.0 - Specified key was too long #114879
Comments
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) recorder documentation |
https://www.home-assistant.io/integrations/recorder#mariadb-and-mysql Make sure you are using innodb myiasm is not supporyed |
When I switched to MySQL, I hadn't seen those instructions in your link, so did none of that. I checked several of the tables in phpMyAdmin, and they are innodb already. Then I thought I'd run the create table statement HA was failing on right inside phpMyAdmin, only I added the ENGINE and CHARSET statements as below: CREATE TABLE migration_changes ( The above worked fine with no errors. I rebooted HA, and it also added a field to the table "states". One more thing to check, I changed the name of the table to create to something else, and removed the ENGINE and CHARSET statements, and then it failed with the same error I got in HA. I think you just need to add the ENGINE and CHARSET statements to your create table code, and the bug would go away. |
One more note: running the statement: SET GLOBAL default_storage_engine = 'InnoDB'; Then running the create table statement without the ENGINE and CHARSET statements does work. I found the setting under MySQL/MySQL Settings default_storage_engine, and changed it to InnoDB, so this should be permanent. Hopefully this helps someone else that may have this issue. |
The problem
I updated from what was the latest version to 2024.4.0 this morning, and the recorder fails. This was working great before, and the only update I did was to 2024.4.0, using HA on W11 inside a VM VirtualBox. I run the database on MySQL 8.3.0.
What version of Home Assistant Core has the issue?
2024.4.0
What was the last working version of Home Assistant Core?
2024.3.3
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Recorder
Link to integration documentation on our website
https://www.home-assistant.io/integrations/recorder
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: