Recently in tinkering with some data related things. There are many ways to import data from SQL Server to MySQL on Ubuntu and Mac. But I chose the simplest one: to convert the SQL Server data into CSV and then import the CSV into MySQL.
The idea is very good, the pit is quite many.
SQL Server is Windows, encoding Format (Unicode) is not the same as Ubuntu, Mac (Utf-8). Exported csv on Ubuntu, Mac Open is garbled, not to mention the import. In the middle of thinking a lot of feasible ways around the past, and later felt too silly. Must be hard just this problem, after repeated research has found a simple solution.
Export the CSV in SQL Server and convert the file format to Utf-8 in Unbuntu/mac (Excel, UE can do the job), save as a new file, and get the CSV in the UTF-8 format you want.
First go to Ubuntu MySQL Guide, when the Import field separator This option to change ":", this is two database incompatible places. Then a burst of hang-up, the CSV was imported into Ubuntu MySQL.
At this point, export the CSV from Unbuntu MySQL and import it to Mac MySQL. When importing on Mac, can not make any changes, according to the prompt all the way to the next step, after the completion of the data import completed.
Why do you want to import it into Ubuntu first? Because my Mac on the import for several days are all kinds of not. But in the Unbutu, casually toss a bit just fine. The compatibility of Ubuntu is better than Mac. So there's a problem that doesn't need to be solved: how do I import the CSV exported from SQL Server directly to Mac MySQL?
Import CSV data exported by SQL Server to MySQL on Ubuntu and Mac