Created
July 7, 2010 15:07
-
-
Save dkln/466809 to your computer and use it in GitHub Desktop.
Convert MySQL tables to utf8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql --database=db -B -N -e "SHOW TABLES" -u root | awk '{print "ALTER TABLE", $1, "CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;"}' | mysql --database=db -u root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment