From MySQL 4 to 5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    From MySQL 4 to 5

    I use phpmyadmin to work on mysql
    I have two server
    1. MYSQL 4
    2. MYSQL 5

    My task is, export data from mysql 4 to MYSQL 5.

    The Problem is Mysql4 contain Japanese character. Encoding is Shift-jis. When I brows to mysql 4 i can see those data clearly.

    But Exporting is getting a head ache. First I tried to Export all data including INSERT query. When I try to import those data to MySQL 5 databse. I completely failed. Simply I lost the data. It is Shift JIS anymore. Even When I open those data in my Notpad++; They are just okay. But I cant update them to MySQL 5.

    I Also tried to export them as CSV. I also check CSV with NotePad++ software. They are exported okay. But When ever I try to Import them into database the data is destroyed again.

    If you can help me I will be grateful.

    If you need any further information let me know.

    Best Regards,
    Johny
  • dgreenhouse
    Recognized Expert Contributor
    • May 2008
    • 250

    #2
    If you haven't read these yet, maybe they'll be the aspirin you need! :-}
    9.1.13.7. Asian Character Sets
    A.11. MySQL 5.0 FAQ — MySQL Chinese, Japanese, and Korean Character Sets

    Comment

    • johny10151981
      Top Contributor
      • Jan 2010
      • 1059

      #3
      Hello,
      No I havent Read these yet but soon will read. Before going there I am happy to say that I have solved it.
      The thing is MySQL 5 has added a new feature. The feature is defining its language. When you define a column as varchar or text or anything related with them you also can define its language which is called Collation. Previously it was set to eucjpms_japanes e_ci. But in MySQL 4 data was saved shift-jis. so all I need to do is change all column to sjis_japanese_c i.

      The data I have downloaded from MySQL 4 as CSV. Then Write a small program(That is a disgusting part) to send all the data to MySQL 5 database. And it worked :)

      Best Regards,
      Johny

      Comment

      Working...