Change database character encoding?

Hello,

Anyone here knows how to change database character encoding. Say I wish to convert any of the current character encoding to UTF-8?

Is there a simple method to do that? Maybe a simple SQL query.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Mahesh Dahale

    Mahesh Dahale

    @mahesh-E2tZ3t Oct 9, 2009

    Try this simple SQL query

    ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
    
  • Kaustubh Katdare

    Kaustubh Katdare

    @thebigk Oct 9, 2009

    mahesh_dahaleTry this simple SQL query

    ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
    

    Yep - however that messed up my wordpress database 😔 .

  • Mahesh Dahale

    Mahesh Dahale

    @mahesh-E2tZ3t Oct 9, 2009

    Sorry for that 😔 see these links

    #-Link-Snipped-#

    #-Link-Snipped-#

  • Kaustubh Katdare

    Kaustubh Katdare

    @thebigk Oct 9, 2009

    I guess I'm going to perform a second test soon. Will keep this thread updated.

    Thanks for the links, Mahesh 😀