MSSQL to MySQL

Source: Internet
Author: User
Tags mssql

Today, I converted an MSSQL database into mysql. Without a conversion tool, I used the following method to convert data tables with few fields. MSSQL uses the Enterprise Manager and MySQL uses phpMyAdmin.

1. Use the MSSQL Enterprise Manager to open the table structure (design table). locally, use phpMyAdmin to create one table based on the structure, optimize the table data fields, and create the table.

2. Use the Enterprise Manager to export a single table, select text from the import source, and select the separator. The original value is ',', because phpMyAdmin defaults to;, so select here ;. Export a text file.

3. Use the single-Table import function of phpMyAdmin. Select the following CSV file and use load data to import the table content.

 

Done!

If there are many fields or many records, this method is not applicable, and you need to use software to help. Currently, as far as enjoy knows, there are two good software that can convert MSSQL into MySQL. One is dbconvert for MSSQL & MySQL, which can be converted to more than 10 MB in two directions. One is MSSQL to MySQL, which is very small and has more than 1 MB of compressed packages. It can specify which tables of a database are imported into SQL, or directly to MySQL, which is quite useful.

I used MSSQL to MySQL to change an MSSQL database to SQL, and found the following two problems in actual operations.

1. Table creation issues. The generated table creation SQL specifies engine = InnoDB. I used the MyISAM type and GBK encoding, and changed it to: Engine = MyISAM default charset = GBK,

2. Encoding Problems. My database is GBK encoded, and the -- default-character-set = GBK option is added during import, so that Chinese characters can be displayed normally.

MySQL -- default-character-set = GBK-D dbname <E: \ HX \ 9enjoy.txt-uroot-P

ArticleSource: Fire Network, original: http://www.liehuo.net/a/201001/3012447.html

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.