Get the most out of your Centmin Mod LEMP stack
Become a Member

MariaDB How to properly export from Mysql 5.5 and preserve Vietnamese characters?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by rdan, Mar 18, 2016.

  1. rdan

    rdan Premium Member Premium Member

    4,503
    1,080
    113
    May 25, 2014
    Ratings:
    +1,577
    Local Time:
    2:21 PM
    Mainline
    10.2
    I am migrating some Data from a server with Mysql 5.5.
    Database has default latin1 collation.

    When I import it to MariaDB 10.1 server, Vietnamese characters messed up even if I use the same database collation.

    I even tried:

    mysqldump -uroot -pXXXXXXXX --default-character-set=latin1 DB_name > DB_name.sql
    mysql -uroot -pXXXXXXXX --default-character-set=latin1 DB_name < DB_name.sql


    Still messing up the characters.
    Please advice :/
     
  2. pamamolf

    pamamolf Premium Member Premium Member

    3,169
    304
    83
    May 31, 2014
    Ratings:
    +551
    Local Time:
    8:21 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    A simple dump without any parameters and setting the exact same database character set on the new server and then a simple import is always ok for me and i mess always with unicode characters without any issues.....
     
  3. rdan

    rdan Premium Member Premium Member

    4,503
    1,080
    113
    May 25, 2014
    Ratings:
    +1,577
    Local Time:
    2:21 PM
    Mainline
    10.2
    Sadly for me that didn't work.
    It messed up Vietnamese Characters.
     
  4. Sunka

    Sunka Well-Known Member

    1,077
    293
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +474
    Local Time:
    7:21 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Try to set both character set (collation) to same before restoring. On database (new one) and on server (sql)
     
..