Skip to content

Margus Roo –

If you're inventing and pioneering, you have to be willing to be misunderstood for long periods of time

  • Cloudbreak Autoscale fix
  • Endast

Mysql db latin to utf8

Posted on September 4, 2009 - March 1, 2010 by margusja

mysqldump -u root -p –opt –default-character-set=latin1 –insert-ignore –skip-set-charset DBNAME > DBNAME.sql

Then using sed I changed all occurrences of the word latin1 to utf8:

iconv -f ISO-8859-1 -t UTF-8 DBNAME.sql > DBNAME_new.sql
sed -e ‘s/latin1/utf8/g’ -i ./DBNAME.sql

From here I then created the new database and then imported the dumpfile.

mysql -p -e “create database DBNAME”

mysql -p –default-character-set=utf8 DBNAME < DBNAME.sql

Posted in Linux

Post navigation

Sex in my hard disk vol2 (sextractor)
GNUPG

Leave a Reply

You must be logged in to post a comment.

The Master

Categories

  • Apache
  • Apple
  • Assembler
  • Audi
  • BigData
  • BMW
  • C
  • Elektroonika
  • Fun
  • Hadoop
  • help
  • Infotehnoloogia koolis
  • IOT
  • IT
  • IT eetilised
  • Java
  • Langevarjundus
  • Lapsed
  • lastekodu
  • Linux
  • M-401
  • Mac
  • Machine Learning
  • Matemaatika
  • Math
  • MSP430
  • Muusika
  • neo4j
  • openCL
  • Õpetaja identiteet ja tegevusvõimekus
  • oracle
  • PHP
  • PostgreSql
  • ProM
  • R
  • Turvalisus
  • Varia
  • Windows
Proudly powered by WordPress | Theme: micro, developed by DevriX.