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
grafana 4.3+ broken on MySQL < 5.7.7 #8450
Comments
I've worked around this in our install (for now) by running the following statements to change the indexes to be prefix indexes:
|
we did change length on all indexed columns to work around this problem.Looks like we missed modifying the length of email field on temp_user |
this is strange, trying to replicate in mysql 5.6 and 5.5 without any success, migrations complete without issue. Do you have to have data that exceeds the limit for the error to appear? |
Just wanted to confirm I see the same issue:
Encountered the same error:
Followed by:
|
We are using 5.6.27-log MySQL Community Server and DBAs told me to execute |
Exactly the same errors as reported here on Ubuntu precise with Percona 5.6.15-rel63.0-519.precise. @Roguelazer thanks for the workaround. |
Not directly related to migrations but Grafana 4.3.1 has also problem adding MySQL datasource for old MariaDB version (5.2.7-MariaDB-mariadb101-log in ly case) - only utf8 unicode charset is supported.
Same error is returned for queries. |
@yuyutime it might be time to upgrade your mariadb server, 5.2.7 was released almost 6 years ago. |
It looks like there are 3 columns that might be causing the problem, will open a PR shortly. |
@Roguelazer did you have a problem with the dashboard slug index? I see that you changed it but didn't see anything in the logs pointing to it? |
I'm pretty certain that I changed all of those in response to error messages printed out. |
I just created a test table with those columns in that index and confirmed that MySQL <5.7.7 returns
|
@Roguelazer #8483 should do the trick, it's working for me against the |
PR is merged to master, and fix is cherry-picked it into v4.3.x 7004a84 will be included in 4.3.2 patch release |
Thanks for the fast response! |
environment
purpose I had the following problem yesterday.
I waited a day for the 4.3.2 patch
|
My environment:
Using Grafana 4.3.2, looks like db migration failed:
Sorry for the very old mysql-server, we can not update it at this moment since production is running on it. |
Trying to upgrade from 4.1.0 to 4.3.2, db migration failed:
Using Mysql 5.6.24. |
Hey, |
I've been running Grafana 4.6.2 against AWS Aurora (mysql) 5.6.10 and it's been working great. Recently, I tried switching to the Grafana 5.0 beta and I'm now getting the " Specified key was too long; max key length is 767 bytes" error. This thread isn't exceptionally clear, is there any way for me to migrate / resolve this issue? |
This has been fixed since b1 was released and will be patched in b2, in the meantime you can use the currently nightly build which includes the fix. |
I got hit with this bug too. I've been using |
Opening a new issue for the beta-2 problem. #10931 |
@nemosupremo @santi8ago8: what version of mysql are you using? |
@nemosupremo @xlson I'm using:
|
I'm using Amazon Aurora MySQL 5.6.10a. I'm assuming its compatible with its sister MySql version. |
@nemosupremo @santi8ago8 Thanks for sharing. |
Grafana 4.3 includes a migration that changes the types of a number of columns to force the charset to utf8mb4. These columns are all
VARCHAR(255)
.MySQL servers using the Antelope file format (or any MySQL server running a version older than 5.7.7, which added the
innodb_large_prefix
setting) cannot have indexes of more than 767 bytes; therefore, all of these migrations fail on MySQL 5.6 with an error likeThis is incredibly irritating to try and work around because grafana bakes the migrations into the bloody binary, so I can't just modify the migration script to drop it from
VARCHAR(255)
toVARCHAR(128)
or to change the index to be a partial index.The text was updated successfully, but these errors were encountered: