Skip to content

Instantly share code, notes, and snippets.

@raecoo
Last active August 29, 2015 14:07
Show Gist options
  • Save raecoo/9d0cfdd46f6f8f4fb07b to your computer and use it in GitHub Desktop.
Save raecoo/9d0cfdd46f6f8f4fb07b to your computer and use it in GitHub Desktop.
updates mysql character for existing database
# References
# http://stackoverflow.com/questions/6115612/how-to-convert-an-entire-mysql-database-characterset-and-collation-to-utf-8
# http://www.a2hosting.com/kb/developer-corner/mysql/convert-mysql-database-utf-8
ALTER DATABASE [DB-NAME] CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE [TABLE-NAME] CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment