Import CSV data exported by SQL Server to MySQL on Ubuntu and Mac

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.