MSSQL to MYSQL, gb2312 to UTF-8 without garbled code Solution

Source: Internet
Author: User
Tags mysql tutorial mysql gui mysql gui tools

Software used: MySQLMigrationTool


The system prompts that the data is too large to be imported. Modify the max_allowed_packet of the my. cnf file to be greater than MB. In windows, my. cnf may not be displayed. You need to enter the address: drive letter: \ directory mysql tutorial binmy. cnf in the editor.

"There can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or on update clause". in MSSQL, more than two Date and Time fields in a table use getdate () to obtain the DEFAULT value. just remove it.

"BLOB/TEXT column 'table name' can't have a default value". This field cannot use the default value. just remove it.

"The maximum row size for the used table type, not counting BLOBs, is 65535. you have to change some columns to TEXT or BLOBs ", this table takes up too much space, and appropriately reduces the number or length of fields.

After running the software, click NEXT to enter the following interface:

Select ms SQL SERVER and follow the prompts. The Connection String is:

Jdbc: jtds: sqlserver: // ip address: Port (1433 by default)/database tutorial name; user = user name; password = password; charset = gb2312; domain =

The next step is MySQL, and the Connection String is:

Jdbc: mysql: // ip address: Port (3306 by default )/? User = username & password = password & useserverprep;ts = false &
CharacterEncoding = UTF-8

Then follow the prompts. On this page, select the table to ignore.

Continue to NEXT and enter this interface. It is critical to set the character encoding here.

Mssql import mysql without garbled characters MySQLMigrationTool
MySQL GUI Tools 5.0 contains MySQLMigrationTool, which can complete our tasks.
This tool requires support of JRE update 8 or above and can be downloaded from sun.com at a very fast speed.
Http://www.java.com/zh_CN/download/manual.jsp
Some people import mysql after running the command. The result is garbled Chinese characters, because there is
Select the encoding step. Here, you must select user defined, and fill in charset = gbk, the value of coll... tion is equal
Gbk_chinese_ci is to change latin and swidish to Chinese. In short, we should be optimistic
Otherwise, you will not be able to blame others for garbled characters.

Next is all the way ....

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.