https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× Welcome to the ToolsJX forum!


Error Error:1267-Illegal mix of collations

  • bobr666
  • bobr666's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 2 months ago #1597

I have a MySQL View that feeds a grid. The grid works fine, but when I search I get this:
Error:1267-Illegal mix of collations (utf8_bin,NONE) and (utf8_general_ci,COERCIBLE)

I understand that this is something to do with the collations used on the view, but I'm struggling with this!

Can anyone help?

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #1602

I suggest that you set all collations to utf8_general_ci.

Regards,

Please Log in or Create an account to join the conversation.

  • bobr666
  • bobr666's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 2 months ago #1607

Still struggling - I can't seem to use the Collation or Charset keywords on a view - they seem only to apply to tables.

I'm reluctant to change the default charset/collation.

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #1637

The view pulls the data out of tables, so you might have to set the collation on these tables.

Please Log in or Create an account to join the conversation.

  • bobr666
  • bobr666's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 2 months ago #1639

I have to do some other things for a couple of days, but thanks for the idea - I will have a look later this week.

Please Log in or Create an account to join the conversation.

  • bobr666
  • bobr666's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 2 months ago #1661

Sorted this out. Collations seem to be an issue on views, but I solved the problem by the following:

CONVERT(format(table.fieldname,0) using utf8) as User_id

I did this on the fields that were not collating to the default.

Once I did this, the search operated fine.

Bob

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.172 seconds

Contact Us

Contact us on Discord

Contact us on Facebook