Skip to content

Instantly share code, notes, and snippets.

@mikemadisonweb
Created November 8, 2016 07:10
Show Gist options
  • Save mikemadisonweb/06276614e29bea8f7131974b7d9fe426 to your computer and use it in GitHub Desktop.
Save mikemadisonweb/06276614e29bea8f7131974b7d9fe426 to your computer and use it in GitHub Desktop.
mysql --database=dbname -B -N -e "SHOW FULL TABLES WHERE Table_Type = 'BASE TABLE'" | awk '{print "ALTER TABLE", $1, "CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;"}' | mysql --database=dbname &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment