The default SQLite database migration to MySQL resulted in an error, and upon opening Grafana, it shows an "invalid character" message

During the process of migrating the database to MySQL, I encountered errors related to certain fields.

Upon opening Grafana, the error message I received is as follows:

“How can I resolve this issue?”

  • My environment:
    my grafana version:9.3.0
    mysql version:5.7.38

I have reviewed the information provided, but I believe there should be a systematic solution to address this issue.https://github.com/grafana/grafana/issues/66636

Which migration process did you use?

I followed these steps to migrate.

I converted the .db file to .sql and then imported it. Upon inspection, there are two fields in total, namely “updated” and “created,” both using milliseconds.

Following the steps mentioned above is a prerequisite. I also attempted this on a virtual machine with version 9.3.1 and encountered the same issue.

1 Like

Additionally, I’ve conducted an analysis, and these two field names are found in the following database table names.
image

Since that is not an official grafana migration (and there is none so far) probably reach out to the author of it to resolve your issues.

But some reverse engineering you could try is create a brand new grafana install with mysql and recreate a couple of alerts manually and see if they work and then compare the data in both the old sqlite and the new mysql. See what thrle discrepancies or differences are if those new alerts in fact work at all in mysql