Illegal mix of collations error in MySql

后端 未结 19 2295
醉梦人生
醉梦人生 2020-11-29 01:11

Just got this answer from a previous question and it works a treat!

SELECT username, (SUM(rating)/COUNT(*)) as TheAverage, Count(*) as TheCount 
FROM ratings         


        
19条回答
  •  伪装坚强ぢ
    2020-11-29 02:01

    I was getting this same error on PhpMyadmin and did the solution indicated here which worked for me

    ALTER TABLE table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci
    

    Illegal mix of collations MySQL Error Also I would recommend going with General instead of swedish since that one is default and not to use the language unless your application is using Swedish.

提交回复
热议问题