GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

pt-online-schema-change to change the collation of a large table?

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • pt-online-schema-change to change the collation of a large table?

    How can I structure this call?

  • #2
    I think general character set and collation is latin1 and latin1_swedish_ci respectively and if you change the default collation of a table, each column you create in that table will get that collation. Anyway, you can change table collation by using pt-online-schema change tool something like below.

    $ pt-online-schema-change --alter 'convert to character set utf8 collate utf8_unicode_ci' --statistics --execute h=server,D=db_name,t=table_to_alter,u=dbuser

    This will update the table character set to utf8 and collation to utf8_unicode_ci for target table.

    Comment

    Working...
    X