Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

MySQL Collation error after upgrading to 5.7?

My data and queries all worked fine under MySQL 5.5. I updated to 5.7 when moving my server to a new machine, however I keep getting a collation error on a fairly complex query.

I have dropped the related tables and rebuilt them so I know the character set is utf8 and the collation is utf8_unicode_ci. I know the database has the same character set and collation.

The following query keeps producing the collation error listed after. Any help would be appreciated. As I said, this query works just fine under MySQL 5.5.

SELECT movies.movie_title, movies.trailer_min, movies.run_time, movies.credit_min, movies.movie_art, times.start_date, times.time, times.aud_num, dates.title_art

FROM movies, times, dates

WHERE movies.movie_id = times.movie_id AND times.date_id = dates.date_id

AND times.start_date = CURDATE()

AND '17:01:53' > SUBTIME(times.time, SEC_TO_TIME(2700)) AND ADDTIME(times.time, SEC_TO_TIME((movies.run_time + movies.trailer_min)*60)) > '17:01:53'

AND times.aud_num = '1'

COLLATE utf8_unicode_ci

ORDER BY times.time LIMIT 1

#1267 - Illegal mix of collations (utf8mb4_unicode_ci,COERCIBLE) and (latin1_swedish_ci,NUMERIC) for operation '>'.

1 Answer

Relevance
  • Anonymous
    5 years ago

    Whenever you upgrade mysql you should run a data upgrade on the new system, it is no use just copying the data files.

Still have questions? Get your answers by asking now.